mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 14:36:34 +00:00
Simplify, suggested by Chris Lattner.
llvm-svn: 53283
This commit is contained in:
parent
6341c5a7ec
commit
a7d102aca3
@ -3478,7 +3478,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
|
|||||||
case Instruction::LShr:
|
case Instruction::LShr:
|
||||||
// (1 << x) & 1 --> zext(x == 0)
|
// (1 << x) & 1 --> zext(x == 0)
|
||||||
// (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,
|
Instruction *NewICmp = new ICmpInst(ICmpInst::ICMP_EQ, Op0RHS,
|
||||||
Constant::getNullValue(I.getType()));
|
Constant::getNullValue(I.getType()));
|
||||||
InsertNewInstBefore(NewICmp, I);
|
InsertNewInstBefore(NewICmp, I);
|
||||||
|
Loading…
Reference in New Issue
Block a user