[llvm] [InstCombine] Fold Xor with or disjoint (PR #105992)
Amr Hesham via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 13:08:19 PDT 2024
AmrDeveloper wrote:
> It's my fault for not providing generalized proof of the issue, but I don't think your pattern here is correct. IIUC, you try to fold `(A | B) ^ C` into `(A ^ C) | B` iff `A ^ C` can be simplified, but it's wrong: https://alive2.llvm.org/ce/z/s7VV8u The correct pattern should be `(A | B) ^ C --> (A ^ C) ^ B`: https://alive2.llvm.org/ce/z/u2vco3 The key is to treat `or disjoint` as `xor`.
Thank you, i change the pattern, test code ...etc
https://github.com/llvm/llvm-project/pull/105992
More information about the llvm-commits
mailing list