Similar to the work on D131672 we optimise integer product if the accumlator value of a loop is initalised to zero
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Note that "-ipsccp" already simplifies this example:
https://alive2.llvm.org/ce/z/WRqr2s
So I'm not sure if there's any practical benefit. It makes instcombine more uniform, so I don't object. We might also go in the other direction, but I don't know what it would take to make sccp FP-aware.