Skip to content

Commit a5be045

Browse files
committed
[InstCombine] Address review comments. NFC.
1 parent 596ed89 commit a5be045

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,8 +1738,7 @@ Instruction *InstCombinerImpl::foldICmpAndShift(ICmpInst &Cmp,
17381738

17391739
// Compute X & (C2 << Y).
17401740
Value *NewAnd = Builder.CreateAnd(Shift->getOperand(0), NewShift);
1741-
return ICmpInst::Create(Instruction::ICmp, Cmp.getPredicate(), NewAnd,
1742-
Cmp.getOperand(1));
1741+
return new ICmpInst(Cmp.getPredicate(), NewAnd, Cmp.getOperand(1));
17431742
}
17441743

17451744
return nullptr;
@@ -1845,8 +1844,7 @@ Instruction *InstCombinerImpl::foldICmpAndConstConst(ICmpInst &Cmp,
18451844
/*HasNUW=*/true),
18461845
One, Or->getName());
18471846
Value *NewAnd = Builder.CreateAnd(A, NewOr, And->getName());
1848-
return ICmpInst::Create(Instruction::ICmp, Cmp.getPredicate(), NewAnd,
1849-
Cmp.getOperand(1));
1847+
return new ICmpInst(Cmp.getPredicate(), NewAnd, Cmp.getOperand(1));
18501848
}
18511849
}
18521850
}

0 commit comments

Comments
 (0)