[llvm] [InstCombine] Fold trunc(lshr(add(shl(X, ShAmt), C), ShrAmt)) (PR #214562)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 06:28:06 PDT 2026


Ineshmcw wrote:

> to me it feels better to have it in `SimplifyDemandedUseBits` as it covers more cases for the same amount of code

I see the appeal @andjo403. My hesitation is that this touches a much more heavily-traveled function, so I want to be careful it doesn't cause regressions elsewhere. Currently running the test suite, if there isn't any issues i'll updated the code, if not i'll ping the issue. 

> also missing generlized proof in the PR description see https://llvm.org/docs/InstCombineContributorGuide.html

Yeah, my bad — I'll update it.

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


More information about the llvm-commits mailing list