Home | History | Annotate | Download | only in X86
      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 -mtriple=i686-apple-darwin -asm-verbose=false \
      4 ; RUN:   | FileCheck %s
      5 ; RUN: llc < %s                       -mtriple=x86_64-apple-darwin | not grep 'lJTI'
      6 ; rdar://6971437
      7 ; rdar://7738756
      8 
      9 declare void @_Z3bari(i32)
     10 
     11 ; CHECK-LINUX: .text._Z3fooILi1EEvi,"axG",@progbits,_Z3fooILi1EEvi,comdat
     12 define linkonce void @_Z3fooILi1EEvi(i32 %Y) nounwind {
     13 entry:
     14 ; CHECK:       L0$pb
     15 ; CHECK-NOT:   leal
     16 ; CHECK:       Ltmp0 = LJTI0_0-L0$pb
     17 ; CHECK-NEXT:  addl Ltmp0(%eax,%ecx,4)
     18 ; CHECK-NEXT:  jmpl *%eax
     19 	%Y_addr = alloca i32		; <i32*> [#uses=2]
     20 	%"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
     21 	store i32 %Y, i32* %Y_addr
     22 	%tmp = load i32* %Y_addr		; <i32> [#uses=1]
     23 	switch i32 %tmp, label %bb10 [
     24 		 i32 0, label %bb3
     25 		 i32 1, label %bb
     26 		 i32 2, label %bb
     27 		 i32 3, label %bb
     28 		 i32 4, label %bb
     29 		 i32 5, label %bb
     30 		 i32 6, label %bb
     31 		 i32 7, label %bb
     32 		 i32 8, label %bb
     33 		 i32 9, label %bb
     34 		 i32 10, label %bb
     35 		 i32 12, label %bb1
     36 		 i32 13, label %bb5
     37 		 i32 14, label %bb6
     38 		 i32 16, label %bb2
     39 		 i32 17, label %bb4
     40 		 i32 23, label %bb8
     41 		 i32 27, label %bb7
     42 		 i32 34, label %bb9
     43 	]
     44 
     45 bb:		; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
     46 	br label %bb1
     47 
     48 bb1:		; preds = %bb, %entry
     49 	br label %bb2
     50 
     51 bb2:		; preds = %bb1, %entry
     52 	call void @_Z3bari( i32 1 )
     53 	br label %bb11
     54 
     55 bb3:		; preds = %entry
     56 	br label %bb4
     57 
     58 bb4:		; preds = %bb3, %entry
     59 	br label %bb5
     60 
     61 bb5:		; preds = %bb4, %entry
     62 	br label %bb6
     63 
     64 bb6:		; preds = %bb5, %entry
     65 	call void @_Z3bari( i32 2 )
     66 	br label %bb11
     67 
     68 bb7:		; preds = %entry
     69 	br label %bb8
     70 
     71 bb8:		; preds = %bb7, %entry
     72 	br label %bb9
     73 
     74 bb9:		; preds = %bb8, %entry
     75 	call void @_Z3bari( i32 3 )
     76 	br label %bb11
     77 
     78 bb10:		; preds = %entry
     79 	br label %bb11
     80 
     81 bb11:		; preds = %bb10, %bb9, %bb6, %bb2
     82 	br label %return
     83 
     84 return:		; preds = %bb11
     85 	ret void
     86 }
     87