[llvm] [LICM] Allow hoisting of InsertElementInst's past non-hoistable InsertElementInsts (PR #200532)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 03:51:16 PDT 2026
nikic wrote:
> > It seems that the pre-commit diff ([dtcxzyw/llvm-opt-benchmark-nightly#445](https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/445)) above shows some minor "regressions" since there are times we hoist the insert element into a pre-header that didn't exist before. Thus, we now add an extra jump into/out of the pre-header. My guess is that this isn't an issue but wanted to check here.
>
> I don't think that's a big issue, should still be preferable to doing the insert inside the loop body
Yes, adding extra preheaders for hoisting is fine.
Though I wouldn't be surprised if this change causes regressions in practice because the extra vector register pressure is not worth saving one insert. But that's a more general LICM problem...
https://github.com/llvm/llvm-project/pull/200532
More information about the llvm-commits
mailing list