Skip to content

Commit e98d45f

Browse files
committed
[ConstraintElim] Add pre-commit tests. NFC.
1 parent fe56c8f commit e98d45f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

llvm/test/Transforms/ConstraintElimination/or-implied-by-operands.ll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,18 @@ entry:
307307
%or = select i1 %cmp.eq, i1 true, i1 %cmp.eq.1
308308
ret i1 %or
309309
}
310+
311+
define i1 @test_or_disjoint_set_operand(i8 %x) {
312+
; CHECK-LABEL: @test_or_disjoint_set_operand(
313+
; CHECK-NEXT: entry:
314+
; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i8 [[X:%.*]], 1
315+
; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 [[X]], 0
316+
; CHECK-NEXT: [[OR:%.*]] = or disjoint i1 [[CMP2]], true
317+
; CHECK-NEXT: ret i1 [[OR]]
318+
;
319+
entry:
320+
%cmp1 = icmp slt i8 %x, 1
321+
%cmp2 = icmp ne i8 %x, 0
322+
%or = or disjoint i1 %cmp2, %cmp1
323+
ret i1 %or
324+
}

0 commit comments

Comments
 (0)