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 \
7 ; RUN: llc < %s -mtriple=x86_64-apple-darwin | not grep 'lJTI'
11 declare void @_Z3bari(i32)
13 ; CHECK-LINUX: .text._Z3fooILi1EEvi,"axG",@progbits,_Z3fooILi1EEvi,comdat
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 ; <i32*> [#uses=2]
32 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
33 store i32 %Y, i32* %Y_addr
34 %tmp = load i32* %Y_addr ; <i32> [#uses=1]
35 switch i32 %tmp, label %bb10 [
57 bb: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
60 bb1: ; preds = %bb, %entry
63 bb2: ; preds = %bb1, %entry
64 call void @_Z3bari( i32 1 )
70 bb4: ; preds = %bb3, %entry
73 bb5: ; preds = %bb4, %entry
76 bb6: ; preds = %bb5, %entry
77 call void @_Z3bari( i32 2 )
83 bb8: ; preds = %bb7, %entry
86 bb9: ; preds = %bb8, %entry
87 call void @_Z3bari( i32 3 )
90 bb10: ; preds = %entry
93 bb11: ; preds = %bb10, %bb9, %bb6, %bb2
96 return: ; preds = %bb11