blob: 27157ca74cada8f29434e0c96e469cc6cb769ece [file] [log] [blame]
Scott Micheldbac4cf2008-01-11 02:53:15 +00001; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
Scott Michelabc58242008-01-11 21:01:19 +00002; RUN: llvm-as -o - %s | llc -march=cellspu -mattr=large_mem > %t2.s
Scott Micheldbac4cf2008-01-11 02:53:15 +00003; RUN: grep bisl %t1.s | count 6 &&
4; RUN: grep ila %t1.s | count 1 &&
5; RUN: grep rotqbyi %t1.s | count 4 &&
6; RUN: grep lqa %t1.s | count 4 &&
7; RUN: grep lqd %t1.s | count 6 &&
8; RUN: grep dispatch_tab %t1.s | count 10
Scott Michelabc58242008-01-11 21:01:19 +00009; RUN: grep bisl %t2.s | count 6 &&
10; RUN: grep ilhu %t2.s | count 1 &&
11; RUN: grep iohl %t2.s | count 1 &&
12; RUN: grep rotqby %t2.s | count 5 &&
13; RUN: grep lqd %t2.s | count 12 &&
14; RUN: grep lqx %t2.s | count 6 &&
15; RUN: grep il %t2.s | count 7 &&
16; RUN: grep ai %t2.s | count 5 &&
17; RUN: grep dispatch_tab %t2.s | count 7
18
Scott Micheldbac4cf2008-01-11 02:53:15 +000019; ModuleID = 'call_indirect.bc'
20target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128"
21target triple = "spu-unknown-elf"
22
23@dispatch_tab = global [6 x void (i32, float)*] zeroinitializer, align 16
24
25define void @dispatcher(i32 %i_arg, float %f_arg) {
26entry:
27 %tmp2 = load void (i32, float)** getelementptr ([6 x void (i32, float)*]* @dispatch_tab, i32 0, i32 0), align 16
28 tail call void %tmp2( i32 %i_arg, float %f_arg )
29 %tmp2.1 = load void (i32, float)** getelementptr ([6 x void (i32, float)*]* @dispatch_tab, i32 0, i32 1), align 4
30 tail call void %tmp2.1( i32 %i_arg, float %f_arg )
31 %tmp2.2 = load void (i32, float)** getelementptr ([6 x void (i32, float)*]* @dispatch_tab, i32 0, i32 2), align 4
32 tail call void %tmp2.2( i32 %i_arg, float %f_arg )
33 %tmp2.3 = load void (i32, float)** getelementptr ([6 x void (i32, float)*]* @dispatch_tab, i32 0, i32 3), align 4
34 tail call void %tmp2.3( i32 %i_arg, float %f_arg )
35 %tmp2.4 = load void (i32, float)** getelementptr ([6 x void (i32, float)*]* @dispatch_tab, i32 0, i32 4), align 4
36 tail call void %tmp2.4( i32 %i_arg, float %f_arg )
37 %tmp2.5 = load void (i32, float)** getelementptr ([6 x void (i32, float)*]* @dispatch_tab, i32 0, i32 5), align 4
38 tail call void %tmp2.5( i32 %i_arg, float %f_arg )
39 ret void
40}