[clang] [llvm] [LICM] Sink unused l-invariant loads in preheader. (PR #157559)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 04:16:54 PDT 2025


https://github.com/nikic approved this pull request.

LGTM

Worth noting that this kind of sinking can also increase register pressure in the loop. E.g. if you sink an instruction with two operands, and the operand instructions cannot be sunk. Then you'll need two registers instead of one in the loop.

Though from what I can tell, this does seem to be beneficial on average.

https://github.com/llvm/llvm-project/pull/157559


More information about the cfe-commits mailing list