Fixes performance regression https://bugs.llvm.org/show_bug.cgi?id=52037
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
While this may make sense, i would still like to see the actual reduced reproducer for the SROA failure.
Unless that new LICM run prevented inlining, i suspect it might be fixable in SROA itself.
@lebedev.ri Reproducer IR is here:
https://gist.github.com/Artem-B/c8d048ce7666f5693a8c899458829f5a
I've included the llvm-reduce test script in the comment there.
Unless that new LICM run prevented inlining, i suspect it might be fixable in SROA itself.
The problem is that one of the peeled-off parts of the loop made it impossible for SROA to figure out the fixed load offset. One of the later GVN passes simplified things enough to let the SROA pass figure out the offset of all the loads..
Specifically, here's the input to the failing SROS pass @ HEAD:
https://gist.github.com/Artem-B/a56797a9b918d4831a303ae2869dc83f
For comparison, here's what IR looked at the point where SROA was able to eliminate the alloca:
https://gist.github.com/Artem-B/0e8786afff6e6838b5cf5a9e21851b5c