[PATCH] D148986: [InstSimplify] with logical ops: (X | Y) ? 0 : X --> 0
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 23 03:37:15 PDT 2023
Allen updated this revision to Diff 516147.
Allen edited the summary of this revision.
Allen added a comment.
Address comment
1. with some refactor to extract InstructionSimplify.cpp#L4569-L4582 in one direction into a helper, and call it in both directions there
2. Add extra case **select_icmp_and_eq** for equals minus one with TODO
3. Delete noundef for tests
4. Add commutation test select_icmp_or_eq_commuted
5. Add vector test select_icmp_or_eq_vec
6. change the match pattern from ICMP_NE to ICMP_EQ, as the instcombine will normalize the ICMP_NE to ICMP_EQ
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148986/new/
https://reviews.llvm.org/D148986
Files:
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstCombine/select-ctlz-to-cttz.ll
llvm/test/Transforms/InstSimplify/select-cmp-or.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148986.516147.patch
Type: text/x-patch
Size: 5339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230423/4763062b/attachment.bin>
More information about the llvm-commits
mailing list