Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; There should be exactly one vxor here. |
| 2 | ; 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 |
| 5 | |
| 6 | ; There should be exactly one vsplti here. |
| 7 | ; 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 |
| 10 | |
| 11 | |
| 12 | void %VXOR(<4 x float>* %P1, <4 x int>* %P2, <4 x float>* %P3) { |
| 13 | %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 |
| 17 | store <4 x float> zeroinitializer, <4 x float>* %P1 |
| 18 | store <4 x int> zeroinitializer, <4 x int>* %P2 |
| 19 | ret void |
| 20 | } |
| 21 | |
| 22 | void %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 | |