mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
Fix bugs identified by VC++.
llvm-svn: 26287
This commit is contained in:
parent
d89b8719f3
commit
6e4fbcce8f
@ -757,9 +757,9 @@ bool InstCombiner::SimplifyDemandedBits(Value *V, uint64_t DemandedMask,
|
||||
|
||||
// If all of the demanded bits are known zero on one side, return the other.
|
||||
// These bits cannot contribute to the result of the 'or'.
|
||||
if ((DemandedMask & ~KnownOne2 & KnownZero) == DemandedMask & ~KnownOne2)
|
||||
if ((DemandedMask & ~KnownOne2 & KnownZero) == (DemandedMask & ~KnownOne2))
|
||||
return UpdateValueUsesWith(I, I->getOperand(0));
|
||||
if ((DemandedMask & ~KnownOne & KnownZero2) == DemandedMask & ~KnownOne)
|
||||
if ((DemandedMask & ~KnownOne & KnownZero2) == (DemandedMask & ~KnownOne))
|
||||
return UpdateValueUsesWith(I, I->getOperand(1));
|
||||
|
||||
// If all of the potentially set bits on one side are known to be set on
|
||||
|
@ -69,13 +69,13 @@ Init *BitsRecTy::convertValue(IntInit *II) {
|
||||
if (Value & ~((1LL << Size)-1))
|
||||
return 0;
|
||||
} else {
|
||||
if ((Value >> Size) != -1 || ((Value & (1 << (Size-1))) == 0))
|
||||
if ((Value >> Size) != -1 || ((Value & (1LL << (Size-1))) == 0))
|
||||
return 0;
|
||||
}
|
||||
|
||||
BitsInit *Ret = new BitsInit(Size);
|
||||
for (unsigned i = 0; i != Size; ++i)
|
||||
Ret->setBit(i, new BitInit(Value & (1 << i)));
|
||||
Ret->setBit(i, new BitInit(Value & (1LL << i)));
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user