Following the work on D131672 we do the same optimisations for integer products.
We add tests to check if a loop gets removed if we repeatdly multiply an array elements with an accumulator initalised to zero
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks for covering the integer case as well. It might be good to rename llvm/test/Transforms/InstCombine/remove-loop-phi-fastmul.ll to something like llvm/test/Transforms/InstCombine/remove-loop-phi-multiply-by-zero.ll or something, as -fastmul still carries a hint to fast FP math.