blob: fc50a5a90a7f43c12226392bdf20cd83e1f54fda [file] [log] [blame]
Matt Arsenault93be6e82016-07-15 22:13:16 +00001; RUN: opt -S -o - -structurizecfg < %s | FileCheck %s
2
3; CHECK-LABEL: @invert_constantexpr_condition(
4; CHECK: %tmp5 = or i1 %tmp4, icmp eq (i32 bitcast (float fadd (float undef, float undef) to i32), i32 0)
5; CHECK: [ icmp ne (i32 bitcast (float fadd (float undef, float undef) to i32), i32 0), %bb ]
6define void @invert_constantexpr_condition(i32 %arg, i32 %arg1) #0 {
7bb:
8 %tmp = icmp eq i32 %arg, 0
9 br i1 icmp eq (i32 bitcast (float fadd (float undef, float undef) to i32), i32 0), label %bb2, label %bb6
10
11bb2:
12 br i1 %tmp, label %bb3, label %bb6
13
14bb3:
15 %tmp4 = phi i1 [ %tmp7, %bb6 ], [ undef, %bb2 ]
16 %tmp5 = or i1 %tmp4, icmp eq (i32 bitcast (float fadd (float undef, float undef) to i32), i32 0)
17 br i1 %tmp5, label %bb8, label %bb8
18
19bb6:
20 %tmp7 = icmp slt i32 %arg, %arg1
21 br label %bb3
22
23bb8:
24 ret void
25}
26
27declare i32 @llvm.amdgcn.workitem.id.x() #1
28
29attributes #0 = { nounwind }
30attributes #1 = { nounwind readnone }