Remove the insertelement instruction (via D98240) can enable further
load/extract scalarization opportunities. Try it again.
Details
- Reviewers
spatel RKSimon lebedev.ri
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Some questions were raised about D98240, so we should deal with those before adding this.
Rebase and ping :)
I think those questions should be addressed by now and the issues raised by Alive2 should also be ironed out now.
I do not like the general direction VectorCombine seems to be going in.
Doing only a single pass and hoping that the second pass wouldn't do anything clearly leads to problems if (!Load->user_empty()) { is solving.
I would think we'd really want an instcombine-lite approach here, with a worklist..
That's a fair point. But I think the same probably holds true fo somer other combines in VectorCombine. So should the whole pass just use a worklist?
@spatel did you by any chance already think/consider this for VectorCombine? Or do you have any concerns?
No concerns. This has come up before (we were walking the instruction bottom-up at some point instead of top-down), but we just didn't have enough motivation with the existing transforms to justify implementing a worklist. If you want to try it, that would be great!