Skip to content

Commit 88f5317

Browse files
kazutakahiratamahesh-attarde
authored andcommitted
[Scalar] Remove an unnecessary cast (NFC) (llvm#150474)
getOperand() already returns Value *.
1 parent b14359c commit 88f5317

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3785,7 +3785,7 @@ LSRInstance::CollectLoopInvariantFixupsAndFormulae() {
37853785
// Ignore icmp instructions which are already being analyzed.
37863786
if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) {
37873787
unsigned OtherIdx = !U.getOperandNo();
3788-
Value *OtherOp = const_cast<Value *>(ICI->getOperand(OtherIdx));
3788+
Value *OtherOp = ICI->getOperand(OtherIdx);
37893789
if (SE.hasComputableLoopEvolution(SE.getSCEV(OtherOp), L))
37903790
continue;
37913791
}

0 commit comments

Comments
 (0)