blob: 297f1c458db91a024520b75611f2638d61db1443 [file] [log] [blame]
Dan Gohmanb243c282008-06-10 00:36:41 +00001; RUN: llvm-as < %s | llc -march=x86-64 > %t
2; RUN: grep unpck %t | count 2
3; RUN: grep shuf %t | count 2
4; RUN: grep ps %t | count 4
5; RUN: grep pd %t | count 4
6; RUN: grep movup %t | count 4
Dan Gohman7dc19012007-08-02 21:17:01 +00007
Evan Cheng18950d92008-05-07 22:59:08 +00008define <4 x float> @a(<4 x float>* %y) nounwind {
Dan Gohman7dc19012007-08-02 21:17:01 +00009 %x = load <4 x float>* %y, align 4
10 %a = extractelement <4 x float> %x, i32 0
11 %b = extractelement <4 x float> %x, i32 1
12 %c = extractelement <4 x float> %x, i32 2
13 %d = extractelement <4 x float> %x, i32 3
14 %p = insertelement <4 x float> undef, float %d, i32 0
15 %q = insertelement <4 x float> %p, float %c, i32 1
16 %r = insertelement <4 x float> %q, float %b, i32 2
17 %s = insertelement <4 x float> %r, float %a, i32 3
18 ret <4 x float> %s
19}
Evan Cheng18950d92008-05-07 22:59:08 +000020define <4 x float> @b(<4 x float>* %y, <4 x float> %z) nounwind {
Dan Gohman7dc19012007-08-02 21:17:01 +000021 %x = load <4 x float>* %y, align 4
22 %a = extractelement <4 x float> %x, i32 2
23 %b = extractelement <4 x float> %x, i32 3
24 %c = extractelement <4 x float> %z, i32 2
25 %d = extractelement <4 x float> %z, i32 3
26 %p = insertelement <4 x float> undef, float %c, i32 0
27 %q = insertelement <4 x float> %p, float %a, i32 1
28 %r = insertelement <4 x float> %q, float %d, i32 2
29 %s = insertelement <4 x float> %r, float %b, i32 3
30 ret <4 x float> %s
31}
Evan Cheng411fc172008-05-13 08:35:03 +000032define <2 x double> @c(<2 x double>* %y) nounwind {
Dan Gohman7dc19012007-08-02 21:17:01 +000033 %x = load <2 x double>* %y, align 8
34 %a = extractelement <2 x double> %x, i32 0
35 %c = extractelement <2 x double> %x, i32 1
36 %p = insertelement <2 x double> undef, double %c, i32 0
37 %r = insertelement <2 x double> %p, double %a, i32 1
38 ret <2 x double> %r
39}
Evan Cheng411fc172008-05-13 08:35:03 +000040define <2 x double> @d(<2 x double>* %y, <2 x double> %z) nounwind {
Dan Gohman7dc19012007-08-02 21:17:01 +000041 %x = load <2 x double>* %y, align 8
42 %a = extractelement <2 x double> %x, i32 1
43 %c = extractelement <2 x double> %z, i32 1
44 %p = insertelement <2 x double> undef, double %c, i32 0
45 %r = insertelement <2 x double> %p, double %a, i32 1
46 ret <2 x double> %r
47}