blob: 54cbdae914887db39e8cc276a841c483edeb0322 [file] [log] [blame]
Chris Lattner88d3c242006-04-12 16:57:39 +00001; There should be exactly one vxor here.
Reid Spencereb1d74e2007-04-16 17:36:08 +00002; RUN: llvm-upgrade < %s | llvm-as | \
3; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
4; RUN: grep vxor | wc -l | grep 1
Chris Lattner8e7401e2006-04-12 16:49:16 +00005
Chris Lattnerfd4297f2006-04-12 17:36:04 +00006; There should be exactly one vsplti here.
Reid Spencereb1d74e2007-04-16 17:36:08 +00007; RUN: llvm-upgrade < %s | llvm-as | \
8; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
9; RUN: grep vsplti | wc -l | grep 1
Chris Lattnerfd4297f2006-04-12 17:36:04 +000010
11
12void %VXOR(<4 x float>* %P1, <4 x int>* %P2, <4 x float>* %P3) {
Chris Lattner88d3c242006-04-12 16:57:39 +000013 %tmp = load <4 x float>* %P3
14 %tmp3 = load <4 x float>* %P1
15 %tmp4 = mul <4 x float> %tmp, %tmp3
16 store <4 x float> %tmp4, <4 x float>* %P3
Chris Lattner8e7401e2006-04-12 16:49:16 +000017 store <4 x float> zeroinitializer, <4 x float>* %P1
18 store <4 x int> zeroinitializer, <4 x int>* %P2
19 ret void
20}
21
Chris Lattnerfd4297f2006-04-12 17:36:04 +000022void %VSPLTI(<4 x int>* %P2, <8 x short>* %P3) {
23 store <4 x int> cast (<16 x sbyte> < sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1, sbyte -1 > to <4 x int>), <4 x int>* %P2
24 store <8 x short> < short -1, short -1, short -1, short -1, short -1, short -1, short -1, short -1 >, <8 x short>* %P3
25 ret void
26}
27