mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -381,7 +381,7 @@ static bool CanEvaluateTruncated(Value *V, Type *Ty) {
|
||||
break;
|
||||
case Instruction::LShr:
|
||||
// If this is a truncate of a logical shr, we can truncate it to a smaller
|
||||
// lshr if we know that the bits we would otherwise be shifting in are
|
||||
// lshr iff we know that the bits we would otherwise be shifting in are
|
||||
// already zeros.
|
||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(I->getOperand(1))) {
|
||||
uint32_t OrigBitWidth = OrigTy->getScalarSizeInBits();
|
||||
@ -527,14 +527,14 @@ Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI,
|
||||
return ReplaceInstUsesWith(CI, In);
|
||||
}
|
||||
|
||||
// zext (X == 0) to i32 --> X^1 if X has only the low bit set.
|
||||
// zext (X == 0) to i32 --> (X>>1)^1 if X has only the 2nd bit set.
|
||||
// zext (X == 1) to i32 --> X if X has only the low bit set.
|
||||
// zext (X == 2) to i32 --> X>>1 if X has only the 2nd bit set.
|
||||
// zext (X != 0) to i32 --> X if X has only the low bit set.
|
||||
// zext (X != 0) to i32 --> X>>1 if X has only the 2nd bit set.
|
||||
// zext (X != 1) to i32 --> X^1 if X has only the low bit set.
|
||||
// zext (X != 2) to i32 --> (X>>1)^1 if X has only the 2nd bit set.
|
||||
// zext (X == 0) to i32 --> X^1 iff X has only the low bit set.
|
||||
// zext (X == 0) to i32 --> (X>>1)^1 iff X has only the 2nd bit set.
|
||||
// zext (X == 1) to i32 --> X iff X has only the low bit set.
|
||||
// zext (X == 2) to i32 --> X>>1 iff X has only the 2nd bit set.
|
||||
// zext (X != 0) to i32 --> X iff X has only the low bit set.
|
||||
// zext (X != 0) to i32 --> X>>1 iff X has only the 2nd bit set.
|
||||
// zext (X != 1) to i32 --> X^1 iff X has only the low bit set.
|
||||
// zext (X != 2) to i32 --> (X>>1)^1 iff X has only the 2nd bit set.
|
||||
if ((Op1CV == 0 || Op1CV.isPowerOf2()) &&
|
||||
// This only works for EQ and NE
|
||||
ICI->isEquality()) {
|
||||
|
Reference in New Issue
Block a user