brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 4d9e060 Raw
45 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=constraint-elimination -S %s | FileCheck %s3 4; Make sure constraints where all variable coefficients are 0 are handled5; properly.6 7define 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:%.*]]10; CHECK:       if.then.i10:11; CHECK-NEXT:    ret i1 false12; CHECK:       if.end.i16:13; CHECK-NEXT:    ret i1 false14;15  %c.1 = icmp ugt i32 %A, %A16  br i1 %c.1, label %if.end.i16, label %if.then.i1017 18if.then.i10:19  ret i1 false20 21if.end.i16:22  %c.2 = icmp ugt i32 %A, %A23  ret i1 %c.224}25 26define 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:%.*]]30; CHECK:       if.then.i10:31; CHECK-NEXT:    ret i1 false32; CHECK:       if.end.i16:33; CHECK-NEXT:    ret i1 true34;35  %c.1 = icmp uge i32 %A, %B36  br i1 %c.1, label %if.end.i16, label %if.then.i1037 38if.then.i10:39  ret i1 false40 41if.end.i16:42  %c.2 = icmp uge i32 %A, %A43  ret i1 %c.244}45