[PATCH] D148420: [InstSimplify] Enhance select icmp and simplification
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 03:36:04 PDT 2023
nikic added a comment.
In D148420#4295784 <https://reviews.llvm.org/D148420#4295784>, @peixin wrote:
> In D148420#4291703 <https://reviews.llvm.org/D148420#4291703>, @nikic wrote:
>
>> It looks like this should be part of simplifySelectBitTest(), which covers other "select of icmp and" patterns.
>
> It seems not, the `CondVal` in `simplifySelectWithICmpCond` is ICmp of value and zero. For cases in `simplifySelectBitTest`, the `CondVal` is ICmp of value and value.
Not sure I follow. Isn't it matching the `(X & C) == 0` pattern here? https://github.com/llvm/llvm-project/blob/f6ec56ac5be26ad862e22d0eebb2645d1ad78218/llvm/lib/Analysis/InstructionSimplify.cpp#L4494-L4500
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148420/new/
https://reviews.llvm.org/D148420
More information about the llvm-commits
mailing list