[llvm] r321641 - [DAGCombine] Fix for PR35765

Sam Parker via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 02:19:01 PST 2018


Author: sam_parker
Date: Tue Jan  2 02:19:01 2018
New Revision: 321641

URL: http://llvm.org/viewvc/llvm-project?rev=321641&view=rev
Log:
[DAGCombine] Fix for PR35765

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

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/trunk/test/CodeGen/X86/pr35765.ll

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=321641&r1=321640&r2=321641&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Jan  2 02:19:01 2018
@@ -3850,7 +3850,6 @@ bool DAGCombiner::SearchForAndLoads(SDNo
       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);

Modified: llvm/trunk/test/CodeGen/X86/pr35765.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr35765.ll?rev=321641&r1=321640&r2=321641&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr35765.ll (original)
+++ llvm/trunk/test/CodeGen/X86/pr35765.ll Tue Jan  2 02:19:01 2018
@@ -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)




More information about the llvm-commits mailing list