1 ;RUN: llc --march=cellspu %s -o - | FileCheck %s
4 define %vec @test_ret(%vec %param)
10 define %vec @test_add(%vec %param)
12 ;CHECK: a {{\$.}}, $3, $3
13 %1 = add %vec %param, %param
18 define %vec @test_sub(%vec %param)
20 ;CHECK: sf {{\$.}}, $4, $3
21 %1 = sub %vec %param, <i32 1, i32 1>
27 define %vec @test_mul(%vec %param)
31 ;CHECK: a {{\$., \$., \$.}}
32 ;CHECK: a {{\$., \$., \$.}}
33 %1 = mul %vec %param, %param
39 define <2 x i32> @test_splat(i32 %param ) {
40 ;see svn log for why this is here...
41 ;CHECK-NOT: or $3, $3, $3
44 %sv = insertelement <1 x i32> undef, i32 %param, i32 0
45 %rv = shufflevector <1 x i32> %sv, <1 x i32> undef, <2 x i32> zeroinitializer
50 define i32 @test_extract() {
52 %rv = extractelement <2 x i32> zeroinitializer, i32 undef ; <i32> [#uses=1]
57 define void @test_store( %vec %val, %vec* %ptr)
59 ;CHECK: stqd $3, 0(${{.}})
61 store %vec %val, %vec* %ptr
65 ;Alignment of <2 x i32> is not *directly* defined in the ABI
66 ;It probably is safe to interpret it as an array, thus having 8 byte
67 ;alignment (according to ABI). This tests that the size of
68 ;[2 x <2 x i32>] is 16 bytes, i.e. there is no padding between the
70 define <2 x i32>* @test_alignment( [2 x <2 x i32>]* %ptr)
72 ; CHECK-NOT: ai $3, $3, 16
75 %rv = getelementptr [2 x <2 x i32>]* %ptr, i32 0, i32 1