blob: 5c512db0e2a23a62cbfea7dae9a375ef8ce5b2cf [file] [log] [blame]
Bruno Cardoso Lopes53c95882011-07-13 22:28:55 +00001; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2
3; CHECK: vaddpd
4define <4 x double> @addpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp {
5entry:
6 %add.i = fadd <4 x double> %x, %y
7 ret <4 x double> %add.i
8}
9
10; CHECK: vaddpd LCP{{.*}}(%rip)
11define <4 x double> @addpd256fold(<4 x double> %y) nounwind uwtable readnone ssp {
12entry:
13 %add.i = fadd <4 x double> %y, <double 4.500000e+00, double 3.400000e+00, double 2.300000e+00, double 1.200000e+00>
14 ret <4 x double> %add.i
15}
16
17; CHECK: vaddps
18define <8 x float> @addps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp {
19entry:
20 %add.i = fadd <8 x float> %x, %y
21 ret <8 x float> %add.i
22}
23
24; CHECK: vaddps LCP{{.*}}(%rip)
25define <8 x float> @addps256fold(<8 x float> %y) nounwind uwtable readnone ssp {
26entry:
27 %add.i = fadd <8 x float> %y, <float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000, float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000>
28 ret <8 x float> %add.i
29}
30
31; CHECK: vsubpd
32define <4 x double> @subpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp {
33entry:
34 %sub.i = fsub <4 x double> %x, %y
35 ret <4 x double> %sub.i
36}
37
38; CHECK: vsubpd (%
39define <4 x double> @subpd256fold(<4 x double> %y, <4 x double>* nocapture %x) nounwind uwtable readonly ssp {
40entry:
41 %tmp2 = load <4 x double>* %x, align 32
42 %sub.i = fsub <4 x double> %y, %tmp2
43 ret <4 x double> %sub.i
44}
45
46; CHECK: vsubps
47define <8 x float> @subps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp {
48entry:
49 %sub.i = fsub <8 x float> %x, %y
50 ret <8 x float> %sub.i
51}
52
53; CHECK: vsubps (%
54define <8 x float> @subps256fold(<8 x float> %y, <8 x float>* nocapture %x) nounwind uwtable readonly ssp {
55entry:
56 %tmp2 = load <8 x float>* %x, align 32
57 %sub.i = fsub <8 x float> %y, %tmp2
58 ret <8 x float> %sub.i
59}
60
61; CHECK: vmulpd
62define <4 x double> @mulpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp {
63entry:
64 %mul.i = fmul <4 x double> %x, %y
65 ret <4 x double> %mul.i
66}
67
68; CHECK: vmulpd LCP{{.*}}(%rip)
69define <4 x double> @mulpd256fold(<4 x double> %y) nounwind uwtable readnone ssp {
70entry:
71 %mul.i = fmul <4 x double> %y, <double 4.500000e+00, double 3.400000e+00, double 2.300000e+00, double 1.200000e+00>
72 ret <4 x double> %mul.i
73}
74
75; CHECK: vmulps
76define <8 x float> @mulps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp {
77entry:
78 %mul.i = fmul <8 x float> %x, %y
79 ret <8 x float> %mul.i
80}
81
82; CHECK: vmulps LCP{{.*}}(%rip)
83define <8 x float> @mulps256fold(<8 x float> %y) nounwind uwtable readnone ssp {
84entry:
85 %mul.i = fmul <8 x float> %y, <float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000, float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000>
86 ret <8 x float> %mul.i
87}
88
89; CHECK: vdivpd
90define <4 x double> @divpd256(<4 x double> %y, <4 x double> %x) nounwind uwtable readnone ssp {
91entry:
92 %div.i = fdiv <4 x double> %x, %y
93 ret <4 x double> %div.i
94}
95
96; CHECK: vdivpd LCP{{.*}}(%rip)
97define <4 x double> @divpd256fold(<4 x double> %y) nounwind uwtable readnone ssp {
98entry:
99 %div.i = fdiv <4 x double> %y, <double 4.500000e+00, double 3.400000e+00, double 2.300000e+00, double 1.200000e+00>
100 ret <4 x double> %div.i
101}
102
103; CHECK: vdivps
104define <8 x float> @divps256(<8 x float> %y, <8 x float> %x) nounwind uwtable readnone ssp {
105entry:
106 %div.i = fdiv <8 x float> %x, %y
107 ret <8 x float> %div.i
108}
109
110; CHECK: vdivps LCP{{.*}}(%rip)
111define <8 x float> @divps256fold(<8 x float> %y) nounwind uwtable readnone ssp {
112entry:
113 %div.i = fdiv <8 x float> %y, <float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000, float 4.500000e+00, float 0x400B333340000000, float 0x4002666660000000, float 0x3FF3333340000000>
114 ret <8 x float> %div.i
115}
116