diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-10-18 18:46:49 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-10-18 18:46:49 +0000 |
commit | 9d45de252c7c3851c0159db4dcaa31e93598b29e (patch) | |
tree | b0d65fcb5ab88b96a5d5b92d5247bdbcf4ab64d5 | |
parent | 7f5f0dae33c8a105b51532d5ceb3339ac2ce0cbc (diff) | |
download | llvm-9d45de252c7c3851c0159db4dcaa31e93598b29e.tar.gz llvm-9d45de252c7c3851c0159db4dcaa31e93598b29e.tar.bz2 llvm-9d45de252c7c3851c0159db4dcaa31e93598b29e.tar.xz |
Use isIntN and isUIntN to check for valid signed/unsigned numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142395 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index c6b9dcc1c4..04b9139815 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -4526,11 +4526,10 @@ static bool isExtendedBUILD_VECTOR(SDNode *N, SelectionDAG &DAG, unsigned EltSize = VT.getVectorElementType().getSizeInBits(); unsigned HalfSize = EltSize / 2; if (isSigned) { - int64_t SExtVal = C->getSExtValue(); - if (SExtVal != SExtVal << (64 - HalfSize) >> (64 - HalfSize)) + if (!isIntN(HalfSize, C->getSExtValue())) return false; } else { - if ((C->getZExtValue() >> HalfSize) != 0) + if (!isUIntN(HalfSize, C->getZExtValue())) return false; } continue; |