[PATCH] D144610: [InstCombine] Add transforms for `(icmp upred (or X, Y), X)`
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 12 13:01:34 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4218-4220
+ // icmp (X | ~Y) eq/ne ~Y
+ // if (X | Y).hasOneUse()
+ // --> (X & ~~Y) eq/ne 0
----------------
No need to spell out one-use in comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4230
+ /*Depth*/ 0))
+ return new ICmpInst(Pred, IC.Builder.CreateAnd(Op1, A), A);
+ }
----------------
As said previously, I don't think this canonicalization makes sense. Please drop it so we can land the rest of this patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144610/new/
https://reviews.llvm.org/D144610
More information about the llvm-commits
mailing list