1 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=GCC -check-prefix=CHECK
2 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-scei-ps4 -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=PS4 -check-prefix=CHECK
3 // RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-sie-ps5 -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=PS4 -check-prefix=CHECK
8 __m64
test_m_pavgusb(__m64 m1
, __m64 m2
) {
9 // PS4-LABEL: define{{.*}} i64 @test_m_pavgusb
10 // GCC-LABEL: define{{.*}} double @test_m_pavgusb
11 // CHECK: @llvm.x86.3dnow.pavgusb
12 return _m_pavgusb(m1
, m2
);
15 __m64
test_m_pf2id(__m64 m
) {
16 // PS4-LABEL: define{{.*}} i64 @test_m_pf2id
17 // GCC-LABEL: define{{.*}} double @test_m_pf2id
18 // CHECK: @llvm.x86.3dnow.pf2id
22 __m64
test_m_pfacc(__m64 m1
, __m64 m2
) {
23 // PS4-LABEL: define{{.*}} i64 @test_m_pfacc
24 // GCC-LABEL: define{{.*}} double @test_m_pfacc
25 // CHECK: @llvm.x86.3dnow.pfacc
26 return _m_pfacc(m1
, m2
);
29 __m64
test_m_pfadd(__m64 m1
, __m64 m2
) {
30 // PS4-LABEL: define{{.*}} i64 @test_m_pfadd
31 // GCC-LABEL: define{{.*}} double @test_m_pfadd
32 // CHECK: @llvm.x86.3dnow.pfadd
33 return _m_pfadd(m1
, m2
);
36 __m64
test_m_pfcmpeq(__m64 m1
, __m64 m2
) {
37 // PS4-LABEL: define{{.*}} i64 @test_m_pfcmpeq
38 // GCC-LABEL: define{{.*}} double @test_m_pfcmpeq
39 // CHECK: @llvm.x86.3dnow.pfcmpeq
40 return _m_pfcmpeq(m1
, m2
);
43 __m64
test_m_pfcmpge(__m64 m1
, __m64 m2
) {
44 // PS4-LABEL: define{{.*}} i64 @test_m_pfcmpge
45 // GCC-LABEL: define{{.*}} double @test_m_pfcmpge
46 // CHECK: @llvm.x86.3dnow.pfcmpge
47 return _m_pfcmpge(m1
, m2
);
50 __m64
test_m_pfcmpgt(__m64 m1
, __m64 m2
) {
51 // PS4-LABEL: define{{.*}} i64 @test_m_pfcmpgt
52 // GCC-LABEL: define{{.*}} double @test_m_pfcmpgt
53 // CHECK: @llvm.x86.3dnow.pfcmpgt
54 return _m_pfcmpgt(m1
, m2
);
57 __m64
test_m_pfmax(__m64 m1
, __m64 m2
) {
58 // PS4-LABEL: define{{.*}} i64 @test_m_pfmax
59 // GCC-LABEL: define{{.*}} double @test_m_pfmax
60 // CHECK: @llvm.x86.3dnow.pfmax
61 return _m_pfmax(m1
, m2
);
64 __m64
test_m_pfmin(__m64 m1
, __m64 m2
) {
65 // PS4-LABEL: define{{.*}} i64 @test_m_pfmin
66 // GCC-LABEL: define{{.*}} double @test_m_pfmin
67 // CHECK: @llvm.x86.3dnow.pfmin
68 return _m_pfmin(m1
, m2
);
71 __m64
test_m_pfmul(__m64 m1
, __m64 m2
) {
72 // PS4-LABEL: define{{.*}} i64 @test_m_pfmul
73 // GCC-LABEL: define{{.*}} double @test_m_pfmul
74 // CHECK: @llvm.x86.3dnow.pfmul
75 return _m_pfmul(m1
, m2
);
78 __m64
test_m_pfrcp(__m64 m
) {
79 // PS4-LABEL: define{{.*}} i64 @test_m_pfrcp
80 // GCC-LABEL: define{{.*}} double @test_m_pfrcp
81 // CHECK: @llvm.x86.3dnow.pfrcp
85 __m64
test_m_pfrcpit1(__m64 m1
, __m64 m2
) {
86 // PS4-LABEL: define{{.*}} i64 @test_m_pfrcpit1
87 // GCC-LABEL: define{{.*}} double @test_m_pfrcpit1
88 // CHECK: @llvm.x86.3dnow.pfrcpit1
89 return _m_pfrcpit1(m1
, m2
);
92 __m64
test_m_pfrcpit2(__m64 m1
, __m64 m2
) {
93 // PS4-LABEL: define{{.*}} i64 @test_m_pfrcpit2
94 // GCC-LABEL: define{{.*}} double @test_m_pfrcpit2
95 // CHECK: @llvm.x86.3dnow.pfrcpit2
96 return _m_pfrcpit2(m1
, m2
);
99 __m64
test_m_pfrsqrt(__m64 m
) {
100 // PS4-LABEL: define{{.*}} i64 @test_m_pfrsqrt
101 // GCC-LABEL: define{{.*}} double @test_m_pfrsqrt
102 // CHECK: @llvm.x86.3dnow.pfrsqrt
103 return _m_pfrsqrt(m
);
106 __m64
test_m_pfrsqrtit1(__m64 m1
, __m64 m2
) {
107 // PS4-LABEL: define{{.*}} i64 @test_m_pfrsqrtit1
108 // GCC-LABEL: define{{.*}} double @test_m_pfrsqrtit1
109 // CHECK: @llvm.x86.3dnow.pfrsqit1
110 return _m_pfrsqrtit1(m1
, m2
);
113 __m64
test_m_pfsub(__m64 m1
, __m64 m2
) {
114 // PS4-LABEL: define{{.*}} i64 @test_m_pfsub
115 // GCC-LABEL: define{{.*}} double @test_m_pfsub
116 // CHECK: @llvm.x86.3dnow.pfsub
117 return _m_pfsub(m1
, m2
);
120 __m64
test_m_pfsubr(__m64 m1
, __m64 m2
) {
121 // PS4-LABEL: define{{.*}} i64 @test_m_pfsubr
122 // GCC-LABEL: define{{.*}} double @test_m_pfsubr
123 // CHECK: @llvm.x86.3dnow.pfsubr
124 return _m_pfsubr(m1
, m2
);
127 __m64
test_m_pi2fd(__m64 m
) {
128 // PS4-LABEL: define{{.*}} i64 @test_m_pi2fd
129 // GCC-LABEL: define{{.*}} double @test_m_pi2fd
130 // CHECK: @llvm.x86.3dnow.pi2fd
134 __m64
test_m_pmulhrw(__m64 m1
, __m64 m2
) {
135 // PS4-LABEL: define{{.*}} i64 @test_m_pmulhrw
136 // GCC-LABEL: define{{.*}} double @test_m_pmulhrw
137 // CHECK: @llvm.x86.3dnow.pmulhrw
138 return _m_pmulhrw(m1
, m2
);
141 __m64
test_m_pf2iw(__m64 m
) {
142 // PS4-LABEL: define{{.*}} i64 @test_m_pf2iw
143 // GCC-LABEL: define{{.*}} double @test_m_pf2iw
144 // CHECK: @llvm.x86.3dnowa.pf2iw
148 __m64
test_m_pfnacc(__m64 m1
, __m64 m2
) {
149 // PS4-LABEL: define{{.*}} i64 @test_m_pfnacc
150 // GCC-LABEL: define{{.*}} double @test_m_pfnacc
151 // CHECK: @llvm.x86.3dnowa.pfnacc
152 return _m_pfnacc(m1
, m2
);
155 __m64
test_m_pfpnacc(__m64 m1
, __m64 m2
) {
156 // PS4-LABEL: define{{.*}} i64 @test_m_pfpnacc
157 // GCC-LABEL: define{{.*}} double @test_m_pfpnacc
158 // CHECK: @llvm.x86.3dnowa.pfpnacc
159 return _m_pfpnacc(m1
, m2
);
162 __m64
test_m_pi2fw(__m64 m
) {
163 // PS4-LABEL: define{{.*}} i64 @test_m_pi2fw
164 // GCC-LABEL: define{{.*}} double @test_m_pi2fw
165 // CHECK: @llvm.x86.3dnowa.pi2fw
169 __m64
test_m_pswapdsf(__m64 m
) {
170 // PS4-LABEL: define{{.*}} i64 @test_m_pswapdsf
171 // GCC-LABEL: define{{.*}} double @test_m_pswapdsf
172 // CHECK: @llvm.x86.3dnowa.pswapd
173 return _m_pswapdsf(m
);
176 __m64
test_m_pswapdsi(__m64 m
) {
177 // PS4-LABEL: define{{.*}} i64 @test_m_pswapdsi
178 // GCC-LABEL: define{{.*}} double @test_m_pswapdsi
179 // CHECK: @llvm.x86.3dnowa.pswapd
180 return _m_pswapdsi(m
);