• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3; CHECK: it	ne
4; CHECK-NEXT: cmpne
5; CHECK-NEXT: bne [[JUMPTARGET:.LBB[0-9]+_[0-9]+]]
6; CHECK: cbz
7; CHECK-NEXT: %if.else163
8; CHECK-NEXT: mov.w
9; CHECK-NEXT: b
10; CHECK: [[JUMPTARGET]]:{{.*}}%if.else173
11; CHECK-NEXT: mov.w
12; CHECK-NEXT: bx lr
13; CHECK-NEXT: %if.else145
14; CHECK-NEXT: mov.w
15
16%struct.hc = type { i32, i32, i32, i32 }
17
18define i32 @t(i32 %type) optsize {
19entry:
20  switch i32 %type, label %if.else173 [
21    i32 13, label %if.then115
22    i32 6, label %if.then102
23  ]
24
25if.then102:
26 br label %if.then115
27
28if.then115:
29  br i1 undef, label %if.else163, label %if.else145
30
31if.else145:
32  %call150 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34865152) optsize
33  br label %while.body172
34
35if.else163:
36  %call168 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34078720) optsize
37  br label %while.body172
38
39while.body172:
40  br label %while.body172
41
42if.else173:
43  ret i32 -1
44}
45
46declare hidden fastcc %struct.hc* @foo(%struct.hc* nocapture, i32) nounwind optsize
47