Byebye llvm-upgrade!
[oota-llvm.git] / test / CodeGen / PowerPC / buildvec_canonicalize.ll
1 ; There should be exactly one vxor here.
2 ; RUN: llvm-as < %s | \
3 ; RUN:   llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
4 ; RUN:   grep vxor | count 1
5
6 ; There should be exactly one vsplti here.
7 ; RUN: llvm-as < %s | \
8 ; RUN:   llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
9 ; RUN:   grep vsplti | count 1
10
11 define void @VXOR(<4 x float>* %P1, <4 x i32>* %P2, <4 x float>* %P3) {
12         %tmp = load <4 x float>* %P3            ; <<4 x float>> [#uses=1]
13         %tmp3 = load <4 x float>* %P1           ; <<4 x float>> [#uses=1]
14         %tmp4 = mul <4 x float> %tmp, %tmp3             ; <<4 x float>> [#uses=1]
15         store <4 x float> %tmp4, <4 x float>* %P3
16         store <4 x float> zeroinitializer, <4 x float>* %P1
17         store <4 x i32> zeroinitializer, <4 x i32>* %P2
18         ret void
19 }
20
21 define void @VSPLTI(<4 x i32>* %P2, <8 x i16>* %P3) {
22         store <4 x i32> bitcast (<16 x i8> < i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1 > to <4 x i32>), <4 x i32>* %P2
23         store <8 x i16> < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1 >, <8 x i16>* %P3
24         ret void
25 }
26