Fix logic think-o

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108601 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-07-17 01:22:19 +00:00
parent 697cba8ec2
commit 15a2f2eff8

View File

@ -4267,7 +4267,7 @@ static SDValue PerformORCombine(SDNode *N,
if (!C)
return SDValue();
unsigned Val = C->getZExtValue();
if (ARM::isBitFieldInvertedMask(Mask) && (Val & ~Mask) != Val)
if (!ARM::isBitFieldInvertedMask(Mask) || (Val & ~Mask) != Val)
return SDValue();
Val >>= CountTrailingZeros_32(~Mask);