blob: a87fbd0dc6555054c7e93184cd19690724e4d982 [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mattr=+sse2 | grep pshufd
2; RUN: llc < %s -march=x86 -mattr=+sse3 | grep movddup
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Evan Chengbf8b2c52008-04-05 00:30:36 +00004define void @test_v4sf(<4 x float>* %P, <4 x float>* %Q, float %X) nounwind {
Tanya Lattner632e88a2008-02-21 07:42:26 +00005 %tmp = insertelement <4 x float> zeroinitializer, float %X, i32 0 ; <<4 x float>> [#uses=1]
6 %tmp2 = insertelement <4 x float> %tmp, float %X, i32 1 ; <<4 x float>> [#uses=1]
7 %tmp4 = insertelement <4 x float> %tmp2, float %X, i32 2 ; <<4 x float>> [#uses=1]
8 %tmp6 = insertelement <4 x float> %tmp4, float %X, i32 3 ; <<4 x float>> [#uses=1]
9 %tmp8 = load <4 x float>* %Q ; <<4 x float>> [#uses=1]
Dan Gohman7ce405e2009-06-04 22:49:04 +000010 %tmp10 = fmul <4 x float> %tmp8, %tmp6 ; <<4 x float>> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011 store <4 x float> %tmp10, <4 x float>* %P
12 ret void
13}
14
Evan Chengbf8b2c52008-04-05 00:30:36 +000015define void @test_v2sd(<2 x double>* %P, <2 x double>* %Q, double %X) nounwind {
Tanya Lattner632e88a2008-02-21 07:42:26 +000016 %tmp = insertelement <2 x double> zeroinitializer, double %X, i32 0 ; <<2 x double>> [#uses=1]
17 %tmp2 = insertelement <2 x double> %tmp, double %X, i32 1 ; <<2 x double>> [#uses=1]
18 %tmp4 = load <2 x double>* %Q ; <<2 x double>> [#uses=1]
Dan Gohman7ce405e2009-06-04 22:49:04 +000019 %tmp6 = fmul <2 x double> %tmp4, %tmp2 ; <<2 x double>> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020 store <2 x double> %tmp6, <2 x double>* %P
21 ret void
22}