Skip to content

Commit 3046d48

Browse files
committed
[InstCombine] Add pre-commit tests. NFC.
1 parent f314e12 commit 3046d48

File tree

1 file changed

+11
-0
lines changed
  • llvm/test/Transforms/InstCombine

1 file changed

+11
-0
lines changed

llvm/test/Transforms/InstCombine/icmp.ll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5365,3 +5365,14 @@ define i1 @icmp_and_inv_pow2_or_zero_ne_0(i32 %A, i32 %B) {
53655365
%cmp = icmp ne i32 %and, 0
53665366
ret i1 %cmp
53675367
}
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

Comments
 (0)