Matt Arsenault | 93be6e8 | 2016-07-15 22:13:16 +0000 | [diff] [blame] | 1 | ; 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 ] |
| 6 | define void @invert_constantexpr_condition(i32 %arg, i32 %arg1) #0 { |
| 7 | bb: |
| 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 | |
| 11 | bb2: |
| 12 | br i1 %tmp, label %bb3, label %bb6 |
| 13 | |
| 14 | bb3: |
| 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 | |
| 19 | bb6: |
| 20 | %tmp7 = icmp slt i32 %arg, %arg1 |
| 21 | br label %bb3 |
| 22 | |
| 23 | bb8: |
| 24 | ret void |
| 25 | } |
| 26 | |
| 27 | declare i32 @llvm.amdgcn.workitem.id.x() #1 |
| 28 | |
| 29 | attributes #0 = { nounwind } |
| 30 | attributes #1 = { nounwind readnone } |