Skip to content

Commit

Permalink
[DAGCombine] Fix for PR35765
Browse files Browse the repository at this point in the history
Remove the acceptance of ANY_EXTEND nodes while trying to move and
nodes back to loads.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35765

Differential Revision: https://reviews.llvm.org/D41625


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321641 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
sparker-arm committed Jan 2, 2018
1 parent 884b5fd commit 2714c01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3850,7 +3850,6 @@ bool DAGCombiner::SearchForAndLoads(SDNode *N,
return false;
}
case ISD::ZERO_EXTEND:
case ISD::ANY_EXTEND:
case ISD::AssertZext: {
unsigned ActiveBits = Mask->getAPIntValue().countTrailingOnes();
EVT ExtVT = EVT::getIntegerVT(*DAG.getContext(), ActiveBits);
Expand Down
3 changes: 2 additions & 1 deletion test/CodeGen/X86/pr35765.ll
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ define void @PR35765() {
; CHECK-NEXT: movzwl {{.*}}(%rip), %ecx
; CHECK-NEXT: movzwl {{.*}}(%rip), %edx
; CHECK-NEXT: notl %edx
; CHECK-NEXT: orl $63488, %edx # imm = 0xF800
; CHECK-NEXT: movzwl %dx, %edx
; CHECK-NEXT: orl %ecx, %edx
; CHECK-NEXT: orl $-2048, %edx # imm = 0xF800
; CHECK-NEXT: xorl %eax, %edx
; CHECK-NEXT: movslq %edx, %rax
; CHECK-NEXT: movq %rax, {{.*}}(%rip)
Expand Down

0 comments on commit 2714c01

Please sign in to comment.