| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s | 
| Chris Lattner | 1b35211 | 2008-01-18 19:53:43 +0000 | [diff] [blame] | 2 | ; RUN: grep mpy     %t1.s | count 44 | 
|  | 3 | ; RUN: grep mpyu    %t1.s | count 4 | 
|  | 4 | ; RUN: grep mpyh    %t1.s | count 10 | 
|  | 5 | ; RUN: grep mpyhh   %t1.s | count 2 | 
|  | 6 | ; RUN: grep rotma   %t1.s | count 12 | 
|  | 7 | ; RUN: grep rotmahi %t1.s | count 4 | 
|  | 8 | ; RUN: grep and     %t1.s | count 2 | 
|  | 9 | ; RUN: grep selb    %t1.s | count 6 | 
|  | 10 | ; RUN: grep fsmbi   %t1.s | count 4 | 
| Scott Michel | 41236c0 | 2008-12-30 23:28:25 +0000 | [diff] [blame] | 11 | ; RUN: grep shli    %t1.s | count 4 | 
| Chris Lattner | 1b35211 | 2008-01-18 19:53:43 +0000 | [diff] [blame] | 12 | ; RUN: grep shlhi   %t1.s | count 4 | 
|  | 13 | ; RUN: grep ila     %t1.s | count 2 | 
| Scott Michel | 7d5eaec | 2008-02-23 18:41:37 +0000 | [diff] [blame] | 14 | ; RUN: grep xsbh    %t1.s | count 4 | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 15 | target 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-s0:128:128" | 
|  | 16 | target triple = "spu" | 
|  | 17 |  | 
|  | 18 | ; 32-bit multiply instruction generation: | 
|  | 19 | define <4 x i32> @mpy_v4i32_1(<4 x i32> %arg1, <4 x i32> %arg2) { | 
|  | 20 | entry: | 
|  | 21 | %A = mul <4 x i32> %arg1, %arg2 | 
|  | 22 | ret <4 x i32> %A | 
|  | 23 | } | 
|  | 24 |  | 
|  | 25 | define <4 x i32> @mpy_v4i32_2(<4 x i32> %arg1, <4 x i32> %arg2) { | 
|  | 26 | entry: | 
|  | 27 | %A = mul <4 x i32> %arg2, %arg1 | 
|  | 28 | ret <4 x i32> %A | 
|  | 29 | } | 
|  | 30 |  | 
|  | 31 | define <8 x i16> @mpy_v8i16_1(<8 x i16> %arg1, <8 x i16> %arg2) { | 
|  | 32 | entry: | 
|  | 33 | %A = mul <8 x i16> %arg1, %arg2 | 
|  | 34 | ret <8 x i16> %A | 
|  | 35 | } | 
|  | 36 |  | 
|  | 37 | define <8 x i16> @mpy_v8i16_2(<8 x i16> %arg1, <8 x i16> %arg2) { | 
|  | 38 | entry: | 
|  | 39 | %A = mul <8 x i16> %arg2, %arg1 | 
|  | 40 | ret <8 x i16> %A | 
|  | 41 | } | 
|  | 42 |  | 
|  | 43 | define <16 x i8> @mul_v16i8_1(<16 x i8> %arg1, <16 x i8> %arg2) { | 
|  | 44 | entry: | 
|  | 45 | %A = mul <16 x i8> %arg2, %arg1 | 
|  | 46 | ret <16 x i8> %A | 
|  | 47 | } | 
|  | 48 |  | 
|  | 49 | define <16 x i8> @mul_v16i8_2(<16 x i8> %arg1, <16 x i8> %arg2) { | 
|  | 50 | entry: | 
|  | 51 | %A = mul <16 x i8> %arg1, %arg2 | 
|  | 52 | ret <16 x i8> %A | 
|  | 53 | } | 
|  | 54 |  | 
|  | 55 | define i32 @mul_i32_1(i32 %arg1, i32 %arg2) { | 
|  | 56 | entry: | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 57 | %A = mul i32 %arg2, %arg1 | 
|  | 58 | ret i32 %A | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 59 | } | 
|  | 60 |  | 
|  | 61 | define i32 @mul_i32_2(i32 %arg1, i32 %arg2) { | 
|  | 62 | entry: | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 63 | %A = mul i32 %arg1, %arg2 | 
|  | 64 | ret i32 %A | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 65 | } | 
|  | 66 |  | 
|  | 67 | define i16 @mul_i16_1(i16 %arg1, i16 %arg2) { | 
|  | 68 | entry: | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 69 | %A = mul i16 %arg2, %arg1 | 
|  | 70 | ret i16 %A | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 71 | } | 
|  | 72 |  | 
|  | 73 | define i16 @mul_i16_2(i16 %arg1, i16 %arg2) { | 
|  | 74 | entry: | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 75 | %A = mul i16 %arg1, %arg2 | 
|  | 76 | ret i16 %A | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 77 | } | 
|  | 78 |  | 
|  | 79 | define i8 @mul_i8_1(i8 %arg1, i8 %arg2) { | 
|  | 80 | entry: | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 81 | %A = mul i8 %arg2, %arg1 | 
|  | 82 | ret i8 %A | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 83 | } | 
|  | 84 |  | 
|  | 85 | define i8 @mul_i8_2(i8 %arg1, i8 %arg2) { | 
|  | 86 | entry: | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 87 | %A = mul i8 %arg1, %arg2 | 
|  | 88 | ret i8 %A | 
| Scott Michel | e4d3e3c | 2008-01-17 20:38:41 +0000 | [diff] [blame] | 89 | } |