Tim Northover | b4ddc08 | 2014-05-30 10:09:59 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=thumbv8 -arm-atomic-cfg-tidy=0 | FileCheck %s |
| 2 | ; RUN: llc < %s -mtriple=thumbv7 -arm-atomic-cfg-tidy=0 -arm-restrict-it | FileCheck %s |
Joey Gouly | a5153cb | 2013-09-09 14:21:49 +0000 | [diff] [blame] | 3 | ; CHECK: it ne |
| 4 | ; CHECK-NEXT: cmpne |
Manman Ren | b681918 | 2014-01-29 23:18:47 +0000 | [diff] [blame] | 5 | ; CHECK-NEXT: bne [[JUMPTARGET:.LBB[0-9]+_[0-9]+]] |
Peter Collingbourne | cfee5b0 | 2015-04-23 20:31:32 +0000 | [diff] [blame] | 6 | ; CHECK: cbz |
Joey Gouly | a5153cb | 2013-09-09 14:21:49 +0000 | [diff] [blame] | 7 | ; CHECK-NEXT: %if.else163 |
| 8 | ; CHECK-NEXT: mov.w |
| 9 | ; CHECK-NEXT: b |
Cong Hou | 511298b | 2015-09-01 01:42:16 +0000 | [diff] [blame] | 10 | ; CHECK: [[JUMPTARGET]]:{{.*}}%if.else173 |
| 11 | ; CHECK-NEXT: mov.w |
Quentin Colombet | 8cb95b8 | 2015-11-18 00:40:54 +0000 | [diff] [blame] | 12 | ; CHECK-NEXT: bx lr |
Joey Gouly | a5153cb | 2013-09-09 14:21:49 +0000 | [diff] [blame] | 13 | ; CHECK-NEXT: %if.else145 |
| 14 | ; CHECK-NEXT: mov.w |
Joey Gouly | a5153cb | 2013-09-09 14:21:49 +0000 | [diff] [blame] | 15 | |
| 16 | %struct.hc = type { i32, i32, i32, i32 } |
| 17 | |
| 18 | define i32 @t(i32 %type) optsize { |
| 19 | entry: |
| 20 | br i1 undef, label %if.then, label %if.else |
| 21 | |
| 22 | if.then: |
| 23 | unreachable |
| 24 | |
| 25 | if.else: |
| 26 | br i1 undef, label %if.then15, label %if.else18 |
| 27 | |
| 28 | if.then15: |
| 29 | unreachable |
| 30 | |
| 31 | if.else18: |
| 32 | switch i32 %type, label %if.else173 [ |
| 33 | i32 3, label %if.then115 |
| 34 | i32 1, label %if.then102 |
| 35 | ] |
| 36 | |
| 37 | if.then102: |
| 38 | br i1 undef, label %cond.true10.i, label %t.exit |
| 39 | |
| 40 | cond.true10.i: |
| 41 | br label %t.exit |
| 42 | |
| 43 | t.exit: |
| 44 | unreachable |
| 45 | |
| 46 | if.then115: |
| 47 | br i1 undef, label %if.else163, label %if.else145 |
| 48 | |
| 49 | if.else145: |
| 50 | %call150 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34865152) optsize |
| 51 | br label %while.body172 |
| 52 | |
| 53 | if.else163: |
| 54 | %call168 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34078720) optsize |
| 55 | br label %while.body172 |
| 56 | |
| 57 | while.body172: |
| 58 | br label %while.body172 |
| 59 | |
| 60 | if.else173: |
| 61 | ret i32 -1 |
| 62 | } |
| 63 | |
| 64 | declare hidden fastcc %struct.hc* @foo(%struct.hc* nocapture, i32) nounwind optsize |
| 65 | |