Fix operand type for int_x86_ssse3_phadd_sw_128 intrinsic
[oota-llvm.git] / test / CodeGen / CBackend / vectors.ll
1 ; RUN: llc < %s -march=c
2 @.str15 = external global [2 x i8]
3
4 define <4 x i32> @foo(<4 x i32> %a, i32 %b) {
5   %c = insertelement <4 x i32> %a, i32 1, i32 %b
6   
7   ret <4 x i32> %c
8 }
9
10 define i32 @test2(<4 x i32> %a, i32 %b) {
11   %c = extractelement <4 x i32> %a, i32 1
12   
13   ret i32 %c
14 }
15
16 define <4 x float> @test3(<4 x float> %Y) {
17         %Z = fadd <4 x float> %Y, %Y
18         %X = shufflevector <4 x float> zeroinitializer, <4 x float> %Z, <4 x i32> < i32 0, i32 5, i32 6, i32 7 >
19         ret <4 x float> %X
20 }
21
22 define void @test4() {
23         %x = alloca <4 x float>
24         %tmp3.i16 = getelementptr <4 x float>* %x, i32 0, i32 0
25         store float 1.0, float* %tmp3.i16
26         ret void
27 }
28
29 define i32* @test5({i32, i32} * %P) {
30         %x = getelementptr {i32, i32} * %P, i32 0, i32 1
31         ret i32* %x
32 }
33
34 define i8* @test6() {
35   ret i8* getelementptr ([2 x i8]* @.str15, i32 0, i32 0) 
36 }
37