summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorSam Parker <sam.parker@arm.com>2018-01-02 10:19:01 +0000
committerSam Parker <sam.parker@arm.com>2018-01-02 10:19:01 +0000
commit3570c554b5a69618480b74aadc1da069fce83fc6 (patch)
tree0df511557c8baf3bf91f66d262d114195b8c2630 /llvm
parent2dea5e0f3cad11a4b4a2e973fdc846bacd7f2ed1 (diff)
downloadbcm5719-llvm-3570c554b5a69618480b74aadc1da069fce83fc6.tar.gz
bcm5719-llvm-3570c554b5a69618480b74aadc1da069fce83fc6.zip
[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 llvm-svn: 321641
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp1
-rw-r--r--llvm/test/CodeGen/X86/pr35765.ll3
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 3218dce8f57..5843f86a842 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -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);
diff --git a/llvm/test/CodeGen/X86/pr35765.ll b/llvm/test/CodeGen/X86/pr35765.ll
index 1b78a4cd392..4d097459e33 100644
--- a/llvm/test/CodeGen/X86/pr35765.ll
+++ b/llvm/test/CodeGen/X86/pr35765.ll
@@ -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)
OpenPOWER on IntegriCloud