We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f314e12 commit 3046d48Copy full SHA for 3046d48
llvm/test/Transforms/InstCombine/icmp.ll
@@ -5365,3 +5365,14 @@ define i1 @icmp_and_inv_pow2_or_zero_ne_0(i32 %A, i32 %B) {
5365
%cmp = icmp ne i32 %and, 0
5366
ret i1 %cmp
5367
}
5368
+
5369
+define i1 @icmp_samesign_logical_and(i32 %In) {
5370
+; CHECK-LABEL: @icmp_samesign_logical_and(
5371
+; CHECK-NEXT: [[C2:%.*]] = icmp samesign eq i32 [[IN:%.*]], 1
5372
+; CHECK-NEXT: ret i1 [[C2]]
5373
+;
5374
+ %c1 = icmp samesign sgt i32 %In, -1
5375
+ %c2 = icmp samesign eq i32 %In, 1
5376
+ %V = select i1 %c1, i1 %c2, i1 false
5377
+ ret i1 %V
5378
+}
0 commit comments