git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142395
91177308-0d34-0410-b5e6-
96231b3b80d8
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;