FWIW InstCombine already folds this. Also avoid the case where C1*C2 overflows.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 19117 Build 19117: arc lint + arc unit
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 | These should be written as CHECK: <var name> followed by CHECK-NEXT: <expression> like in @test7. |
LLVM usually prefers auto * for pointers.