aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-10-18 17:34:51 +0000
committerBob Wilson <bob.wilson@apple.com>2011-10-18 17:34:51 +0000
commitad952ad8f05a1c5082a6b7ac8627008fa24d722a (patch)
treecbb3b398bd2102a32f4110b0d9e655d55385f17f /lib
parentdb2b18febaea04d01b3dcb24fc44d5be7bd27a00 (diff)
downloadexternal_llvm-ad952ad8f05a1c5082a6b7ac8627008fa24d722a.zip
external_llvm-ad952ad8f05a1c5082a6b7ac8627008fa24d722a.tar.gz
external_llvm-ad952ad8f05a1c5082a6b7ac8627008fa24d722a.tar.bz2
Fix incorrect check for sign-extended constant BUILD_VECTOR.
<rdar://problem/10298332> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index 1615f5b..7753006 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -4527,7 +4527,7 @@ static bool isExtendedBUILD_VECTOR(SDNode *N, SelectionDAG &DAG,
unsigned HalfSize = EltSize / 2;
if (isSigned) {
int64_t SExtVal = C->getSExtValue();
- if ((SExtVal >> HalfSize) != (SExtVal >> EltSize))
+ if (SExtVal != SExtVal << (64 - HalfSize) >> (64 - HalfSize))
return false;
} else {
if ((C->getZExtValue() >> HalfSize) != 0)