FWIW InstCombine already folds this. Also avoid the case where C1*C2 overflows.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Don't generate the multiply, as we get the result for free anyway (we need to check overflow by using umul_ov).
llvm/test/Analysis/ScalarEvolution/fold.ll | ||
---|---|---|
106 ↗ | (On Diff #150587) | These should be written as CHECK: <var name> followed by CHECK-NEXT: <expression> like in @test7. |