[llvm] [InstCombine] Simplify select using KnownBits of condition (PR #95923)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 03:52:37 PDT 2024


nikic wrote:

Okay, it seems like the "adding member causes significant compile time regression" is some kind of gcc optimization fluke. Recently https://github.com/llvm/llvm-project/commit/326ba38a991250a8587a399a260b0f7af2c9166a landed, which really shouldn't have any impact at all, but it caused this regression: http://llvm-compile-time-tracker.com/compare.php?from=ca4e5a8d6e00d8a851c3bbd01442193f97a80139&to=326ba38a991250a8587a399a260b0f7af2c9166a&stat=instructions:u

And after that change, the impact of this PR is now only barely above the significant threshold: http://llvm-compile-time-tracker.com/compare.php?from=a1ad98813006cefcdf88336db3f81a15b6bf36fb&to=0aac38777827865b40830ed8f00a3c6937dbcec4&stat=instructions:u I think that's good enough to move forward?

I suspect that there may be some kind of optimization that bails out based on function size or something and there are commits that get unlucky with it. There was some time in the past where harmless ValueTracking changes kept toggling back and forth between a slow and a fast variant, but I haven't seem this in quite a while anymore. Looks like it's back now...

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


More information about the llvm-commits mailing list