mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 23:29:20 +00:00
Simplify, suggested by Chris Lattner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ee863ecc0
commit
d8ad492238
@ -3478,7 +3478,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
|
||||
case Instruction::LShr:
|
||||
// (1 << x) & 1 --> zext(x == 0)
|
||||
// (1 >> x) & 1 --> zext(x == 0)
|
||||
if (AndRHSMask.getLimitedValue() == 1 && Op0LHS == AndRHS) {
|
||||
if (AndRHSMask == 1 && Op0LHS == AndRHS) {
|
||||
Instruction *NewICmp = new ICmpInst(ICmpInst::ICMP_EQ, Op0RHS,
|
||||
Constant::getNullValue(I.getType()));
|
||||
InsertNewInstBefore(NewICmp, I);
|
||||
|
Loading…
x
Reference in New Issue
Block a user