1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=constraint-elimination -S %s | FileCheck %s
4 ; Make sure constraints where all variable coefficients are 0 are handled
7 define i1 @test_1_always_false(i32 %A, i32 %B) {
8 ; CHECK-LABEL: @test_1_always_false(
9 ; CHECK-NEXT: br i1 false, label [[IF_END_I16:%.*]], label [[IF_THEN_I10:%.*]]
11 ; CHECK-NEXT: ret i1 false
13 ; CHECK-NEXT: ret i1 false
15 %c.1 = icmp ugt i32 %A, %A
16 br i1 %c.1, label %if.end.i16, label %if.then.i10
22 %c.2 = icmp ugt i32 %A, %A
26 define i1 @test_2_always_true(i32 %A, i32 %B) {
27 ; CHECK-LABEL: @test_2_always_true(
28 ; CHECK-NEXT: [[C_1:%.*]] = icmp uge i32 [[A:%.*]], [[B:%.*]]
29 ; CHECK-NEXT: br i1 [[C_1]], label [[IF_END_I16:%.*]], label [[IF_THEN_I10:%.*]]
31 ; CHECK-NEXT: ret i1 false
33 ; CHECK-NEXT: ret i1 true
35 %c.1 = icmp uge i32 %A, %B
36 br i1 %c.1, label %if.end.i16, label %if.then.i10
42 %c.2 = icmp uge i32 %A, %A