[llvm] [InstCombine] Convert load from LUT into a select (PR #98339)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 06:14:04 PDT 2024


https://github.com/nikic commented:

> > The implementation here is still too type-based. While the GEP offsets are now handled properly, you're still doing type-based analysis on the constant initializer. You should use ConstantFoldLoadFromConst for that instead.
> 
> Compile-time impact looks worse: http://llvm-compile-time-tracker.com/compare.php?from=a49066220879b7b24d40c8a65fbe5fd1535240a5&to=de550d309914b8f0bd1d63d5506e0674adf2081c&stat=instructions:u

The kimwitu++ regression is due to a code size increase. Can you please check it?

If the compile-time impact is a concern, we could move the fold to AggressiveInstCombine. It already has something similar in foldPatternedLoads.

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


More information about the llvm-commits mailing list