[PATCH] D151694: [InstCombine] Add test case for (icmp eq A, -1) & (icmp eq B, -1) --> (icmp eq (A&B), -1); NFC
Shivam Gupta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 2 10:38:00 PDT 2023
xgupta added a comment.
In D151694#4389823 <https://reviews.llvm.org/D151694#4389823>, @goldstein.w.n wrote:
> Please regenerate the tests here + in the implementation (I think you forgot to when you switched the parent/child relationship).
Yes, I am not sure about how parent/child revisions work.
I will update the patch soon, seems the test cases are not correct for this patch, even without change there is icmp fold happening.
Without change -
define i1 @icmp_eq_m1_and_eq_m1(i8 %x, i8 %y) {
; CHECK-LABEL: @icmp_eq_m1_and_eq_m1(
; CHECK-NEXT: [[TMP1:%.*]] = and i8 [[X:%.*]], [[Y:%.*]]
; CHECK-NEXT: [[R:%.*]] = icmp eq i8 [[TMP1]], -1
; CHECK-NEXT: ret i1 [[R]]
;
%rx = icmp eq i8 %x, -1
%ry = icmp eq i8 %y, -1
%r = and i1 %rx, %ry
ret i1 %r
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151694/new/
https://reviews.llvm.org/D151694
More information about the llvm-commits
mailing list