[llvm] [InstCombine] Canonicalize xor with disjoint ops to or disjoint (PR #133139)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 2 21:06:06 PDT 2025
arsenm wrote:
> I don't think this transformation is profitable. Generally cmov is cheaper than mul. InstCombiner performs similar transformations in foldSelectICmpAndBinOp for add/xor/shl/lshr/ashr/..., but not for mul.
It's fewer IR instructions, so it's better canonical form. Undoing for profitability is a backend issue
https://github.com/llvm/llvm-project/pull/133139
More information about the llvm-commits
mailing list