Skip to content

Commit 8f76522

Browse files
committed
[SCEV] Remove mul handling from BuildConstantFromSCEV()
We can't support this once mul constant expressions are removed, and this is not useful in any practical sense (as this code is primarily intended for GEP expressions).
1 parent 87b00ef commit 8f76522

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9688,18 +9688,7 @@ static Constant *BuildConstantFromSCEV(const SCEV *V) {
96889688
}
96899689
return C;
96909690
}
9691-
case scMulExpr: {
9692-
const SCEVMulExpr *SM = cast<SCEVMulExpr>(V);
9693-
Constant *C = nullptr;
9694-
for (const SCEV *Op : SM->operands()) {
9695-
assert(!Op->getType()->isPointerTy() && "Can't multiply pointers");
9696-
Constant *OpC = BuildConstantFromSCEV(Op);
9697-
if (!OpC)
9698-
return nullptr;
9699-
C = C ? ConstantExpr::getMul(C, OpC) : OpC;
9700-
}
9701-
return C;
9702-
}
9691+
case scMulExpr:
97039692
case scSignExtend:
97049693
case scZeroExtend:
97059694
case scUDivExpr:

0 commit comments

Comments
 (0)