1 ; RUN: llc < %s -relocation-model=pic -mtriple=i386-linux-gnu -asm-verbose=false \
2 ; RUN: | FileCheck %s --check-prefix=CHECK-LINUX
3 ; RUN: llc < %s -relocation-model=pic -mark-data-regions -mtriple=i686-apple-darwin -asm-verbose=false \
4 ; RUN: | FileCheck %s --check-prefix=CHECK-DATA
5 ; RUN: llc < %s -relocation-model=pic -mtriple=i686-apple-darwin -asm-verbose=false \
6 ; RUN: | FileCheck %s --check-prefix=CHECK-DATA
7 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | not grep 'lJTI'
11 declare void @_Z3bari(i32)
13 ; CHECK-LINUX: _Z3fooILi1EEvi:
14 define linkonce void @_Z3fooILi1EEvi(i32 %Y) nounwind {
18 ; CHECK: Ltmp0 = LJTI0_0-L0$pb
19 ; CHECK-NEXT: addl Ltmp0(%eax,%ecx,4)
20 ; CHECK-NEXT: jmpl *%eax
22 ;; When data-in-code markers are enabled, we should see them around the jump
24 ; CHECK-DATA: .data_region jt32
26 ; CHECK-DATA: .end_data_region
28 ;; When they're not enabled, make sure we don't see them at all.
29 ; CHECK-NOT: .data_region
30 ; CHECK-LINUX-NOT: .data_region
31 %Y_addr = alloca i32 ; <ptr> [#uses=2]
32 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
33 store i32 %Y, ptr %Y_addr
34 %tmp = load i32, ptr %Y_addr ; <i32> [#uses=1]
35 switch i32 %tmp, label %bb10 [
57 bb: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
58 call void @_Z3bari( i32 0 )
61 bb1: ; preds = %bb, %entry
62 call void @_Z3bari( i32 1 )
65 bb2: ; preds = %bb1, %entry
66 call void @_Z3bari( i32 2 )
72 bb4: ; preds = %bb3, %entry
75 bb5: ; preds = %bb4, %entry
78 bb6: ; preds = %bb5, %entry
79 call void @_Z3bari( i32 2 )
85 bb8: ; preds = %bb7, %entry
88 bb9: ; preds = %bb8, %entry
89 call void @_Z3bari( i32 3 )
92 bb10: ; preds = %entry
95 bb11: ; preds = %bb10, %bb9, %bb6, %bb2
98 return: ; preds = %bb11