[PATCH] D140666: [InstCombine] combine intersection for inequality icmps
Yingchi Long via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 29 04:19:28 PST 2023
inclyc added a comment.
> I don't think BMask_Mixed and BMask_NotMixed will happen at the same time.
`LLVM.Transforms/InstCombine::sign-test-and-or.ll` has given us an example.
define i1 @test9(i32 %a) {
; CHECK-LABEL: @test9(
; CHECK-NEXT: [[TMP1:%.*]] = and i32 [[A:%.*]], -1073741824
; CHECK-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP1]], 1073741824
; CHECK-NEXT: ret i1 [[TMP2]]
;
%1 = and i32 %a, 1073741824
%2 = icmp ne i32 %1, 0
%3 = icmp sgt i32 %a, -1
%or.cond = and i1 %2, %3
ret i1 %or.cond
}
I'm not sure about this, but the debugger showed me `Mask = BMask_Mixed | BMask_NotMixed`. Can you reproduce this on your machine?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140666/new/
https://reviews.llvm.org/D140666
More information about the llvm-commits
mailing list