blob: 0454c584bcfe372cd982a08b9bb69b83c3bba231 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; There should be exactly one vxor here.
Dan Gohman0cb2f672009-09-11 18:36:27 +00002; RUN: llc < %s -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
Dan Gohman8c89a502007-08-15 13:36:28 +00003; RUN: grep vxor | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
5; There should be exactly one vsplti here.
Dan Gohman0cb2f672009-09-11 18:36:27 +00006; RUN: llc < %s -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
Dan Gohman8c89a502007-08-15 13:36:28 +00007; RUN: grep vsplti | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008
Tanya Lattner348c6182008-03-25 04:26:08 +00009define void @VXOR(<4 x float>* %P1, <4 x i32>* %P2, <4 x float>* %P3) {
10 %tmp = load <4 x float>* %P3 ; <<4 x float>> [#uses=1]
11 %tmp3 = load <4 x float>* %P1 ; <<4 x float>> [#uses=1]
Dan Gohman7ce405e2009-06-04 22:49:04 +000012 %tmp4 = fmul <4 x float> %tmp, %tmp3 ; <<4 x float>> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013 store <4 x float> %tmp4, <4 x float>* %P3
14 store <4 x float> zeroinitializer, <4 x float>* %P1
Tanya Lattner348c6182008-03-25 04:26:08 +000015 store <4 x i32> zeroinitializer, <4 x i32>* %P2
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016 ret void
17}
18
Tanya Lattner348c6182008-03-25 04:26:08 +000019define void @VSPLTI(<4 x i32>* %P2, <8 x i16>* %P3) {
20 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
21 store <8 x i16> < i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1 >, <8 x i16>* %P3
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022 ret void
23}
24