[llvm-commits] [llvm] r142395 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Bob Wilson
bob.wilson at apple.com
Tue Oct 18 11:46:49 PDT 2011
Author: bwilson
Date: Tue Oct 18 13:46:49 2011
New Revision: 142395
URL: http://llvm.org/viewvc/llvm-project?rev=142395&view=rev
Log:
Use isIntN and isUIntN to check for valid signed/unsigned numbers.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=142395&r1=142394&r2=142395&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Oct 18 13:46:49 2011
@@ -4526,11 +4526,10 @@
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;
More information about the llvm-commits
mailing list