[llvm] [InstCombine] Don't shrink AND mask if it grows the immediate (PR #199360)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 7 11:08:51 PDT 2026
mygitljf wrote:
I reworked this PR to avoid putting the target-specific decision in InstCombine.
Handles it as a late IR CodeGen rewrite before CodeGenPrepare, while assume information is still available. X86 opts into it, and the rewrite is only done when known bits prove the immediate is equivalent.
My current patch handles this case before CodeGenPrepare drops the assume, but it does not fix the more general problem of making assume information available to SDAGBuilder. Does this narrower CodeGen rewrite seem reasonable for this PR?
https://github.com/llvm/llvm-project/pull/199360
More information about the llvm-commits
mailing list