1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt < %s -S -passes=instcombine | FileCheck %s
4 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
7 ; CHECK-LABEL: define i32 @test() {
9 ; CHECK-NEXT: br i1 true, label [[BB_I:%.*]], label [[CALCULATECOLORSPECIFICBLACKLEVEL_EXIT:%.*]]
11 ; CHECK-NEXT: br label [[BB51_I_I:%.*]]
13 ; CHECK-NEXT: br label [[BB51_I_I]]
15 ; CHECK-NEXT: br i1 false, label [[BB27_I_I:%.*]], label [[BB57_I_I:%.*]]
17 ; CHECK-NEXT: ret i32 0
18 ; CHECK: calculateColorSpecificBlackLevel.exit:
19 ; CHECK-NEXT: ret i32 undef
22 %tmp50.i17 = icmp slt i32 0, 4
23 br i1 %tmp50.i17, label %bb.i, label %calculateColorSpecificBlackLevel.exit
29 %tmp31.i.i = load i16, ptr null, align 2
30 %tmp35.i.i = icmp ult i16 %tmp31.i.i, 1
31 %tmp41.i.i = icmp ugt i16 %tmp31.i.i, -1
32 %bothcond.i.i = or i1 %tmp35.i.i, %tmp41.i.i
33 %bothcond1.i.i = zext i1 %bothcond.i.i to i32
34 %tmp46.i.i = xor i32 %bothcond1.i.i, 1
35 %count.0.i.i = add i32 %count.1.i.i, %tmp46.i.i
36 %tmp50.i.i = add i32 %x.0.i.i, 2
40 %count.1.i.i = phi i32 [ %count.0.i.i, %bb27.i.i ], [ 0, %bb.i ]
41 %x.0.i.i = phi i32 [ %tmp50.i.i, %bb27.i.i ], [ 0, %bb.i ]
42 %tmp54.i.i = icmp slt i32 %x.0.i.i, 0
43 br i1 %tmp54.i.i, label %bb27.i.i, label %bb57.i.i
48 calculateColorSpecificBlackLevel.exit: