[PATCH] D151660: [InstCombine] (icmp eq A, -1) & (icmp eq B, -1) --> (icmp eq (A&B), -1)
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 21:48:06 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2952
+ // (icmp eq A, -1) & (icmp eq B, -1) --> (icmp eq (A&B), -1)
+ // TODO: Remove this when foldLogOpOfMaskedICmps can handle undefs.
+ if (!IsLogical && PredL == (IsAnd ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) &&
----------------
xgupta wrote:
> goldstein.w.n wrote:
> > Is there why this patch adds this new functionality and doesn't juist update `foldLogOpOfMaskedICmps` to handle undefs? Is it alot of work?
> I have not thought about that, I will try to explore that.
> I wrote this as similar to a few line above for (icmp eq A, 0) & (icmp eq B, 0) --> (icmp eq (A|B), 0)"
well I'm just wondering what the todo is about.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151660/new/
https://reviews.llvm.org/D151660
More information about the llvm-commits
mailing list