[PATCH] D133919: [InstCombine] Fold ((x?1:4)&(y?1:4))==0 to x^y
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 23:59:57 PST 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:6489
+ }
+ // (icmp ne (and (select A, C, D), (select B, C, D)), 0) --> (not (xor A,
+ // B), true)
----------------
It would reduce alot of duplicate code to handle `ne` with the `eq` code and just add the `not` if `Pred == ICMP_NE`.
Also probably should add alive2 link for this case too:
https://alive2.llvm.org/ce/z/NhgW3z
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133919/new/
https://reviews.llvm.org/D133919
More information about the llvm-commits
mailing list