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 | 93b0f7b31949691508adac260890294f783ab68e (patch) | |
tree | 20cdbf5358da53ceee3f7e57293b85b56aa12e35 | |
parent | 3f07c429b58215b45556d355b6863f19520043ae (diff) | |
download | bcm5719-llvm-93b0f7b31949691508adac260890294f783ab68e.tar.gz bcm5719-llvm-93b0f7b31949691508adac260890294f783ab68e.zip |
Use isIntN and isUIntN to check for valid signed/unsigned numbers.
llvm-svn: 142395
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index c6b9dcc1c46..04b91398156 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/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; |