2016-09-28 19:59:09 +08:00
|
|
|
// 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
|
|
|
|
// 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
|
2012-02-20 15:35:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
#include <x86intrin.h>
|
|
|
|
|
|
|
|
__m64 test_m_pavgusb(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pavgusb
|
|
|
|
// GCC-LABEL: define double @test_m_pavgusb
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pavgusb
|
|
|
|
return _m_pavgusb(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pf2id(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pf2id
|
|
|
|
// GCC-LABEL: define double @test_m_pf2id
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pf2id
|
|
|
|
return _m_pf2id(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfacc(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfacc
|
|
|
|
// GCC-LABEL: define double @test_m_pfacc
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfacc
|
|
|
|
return _m_pfacc(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfadd(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfadd
|
|
|
|
// GCC-LABEL: define double @test_m_pfadd
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfadd
|
|
|
|
return _m_pfadd(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfcmpeq(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfcmpeq
|
|
|
|
// GCC-LABEL: define double @test_m_pfcmpeq
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfcmpeq
|
|
|
|
return _m_pfcmpeq(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfcmpge(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfcmpge
|
|
|
|
// GCC-LABEL: define double @test_m_pfcmpge
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfcmpge
|
|
|
|
return _m_pfcmpge(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfcmpgt(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfcmpgt
|
|
|
|
// GCC-LABEL: define double @test_m_pfcmpgt
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfcmpgt
|
|
|
|
return _m_pfcmpgt(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfmax(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfmax
|
|
|
|
// GCC-LABEL: define double @test_m_pfmax
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfmax
|
|
|
|
return _m_pfmax(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfmin(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfmin
|
|
|
|
// GCC-LABEL: define double @test_m_pfmin
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfmin
|
|
|
|
return _m_pfmin(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfmul(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfmul
|
|
|
|
// GCC-LABEL: define double @test_m_pfmul
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfmul
|
|
|
|
return _m_pfmul(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfrcp(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfrcp
|
|
|
|
// GCC-LABEL: define double @test_m_pfrcp
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfrcp
|
|
|
|
return _m_pfrcp(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfrcpit1(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfrcpit1
|
|
|
|
// GCC-LABEL: define double @test_m_pfrcpit1
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfrcpit1
|
|
|
|
return _m_pfrcpit1(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfrcpit2(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfrcpit2
|
|
|
|
// GCC-LABEL: define double @test_m_pfrcpit2
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfrcpit2
|
|
|
|
return _m_pfrcpit2(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfrsqrt(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfrsqrt
|
|
|
|
// GCC-LABEL: define double @test_m_pfrsqrt
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfrsqrt
|
|
|
|
return _m_pfrsqrt(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfrsqrtit1(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfrsqrtit1
|
|
|
|
// GCC-LABEL: define double @test_m_pfrsqrtit1
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfrsqit1
|
|
|
|
return _m_pfrsqrtit1(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfsub(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfsub
|
|
|
|
// GCC-LABEL: define double @test_m_pfsub
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfsub
|
|
|
|
return _m_pfsub(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfsubr(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfsubr
|
|
|
|
// GCC-LABEL: define double @test_m_pfsubr
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pfsubr
|
|
|
|
return _m_pfsubr(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pi2fd(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pi2fd
|
|
|
|
// GCC-LABEL: define double @test_m_pi2fd
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pi2fd
|
|
|
|
return _m_pi2fd(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pmulhrw(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pmulhrw
|
|
|
|
// GCC-LABEL: define double @test_m_pmulhrw
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnow.pmulhrw
|
|
|
|
return _m_pmulhrw(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pf2iw(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pf2iw
|
|
|
|
// GCC-LABEL: define double @test_m_pf2iw
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnowa.pf2iw
|
|
|
|
return _m_pf2iw(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfnacc(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfnacc
|
|
|
|
// GCC-LABEL: define double @test_m_pfnacc
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnowa.pfnacc
|
|
|
|
return _m_pfnacc(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pfpnacc(__m64 m1, __m64 m2) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pfpnacc
|
|
|
|
// GCC-LABEL: define double @test_m_pfpnacc
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnowa.pfpnacc
|
|
|
|
return _m_pfpnacc(m1, m2);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pi2fw(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pi2fw
|
|
|
|
// GCC-LABEL: define double @test_m_pi2fw
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnowa.pi2fw
|
|
|
|
return _m_pi2fw(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pswapdsf(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pswapdsf
|
|
|
|
// GCC-LABEL: define double @test_m_pswapdsf
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnowa.pswapd
|
|
|
|
return _m_pswapdsf(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
__m64 test_m_pswapdsi(__m64 m) {
|
2016-03-04 13:26:16 +08:00
|
|
|
// PS4-LABEL: define i64 @test_m_pswapdsi
|
|
|
|
// GCC-LABEL: define double @test_m_pswapdsi
|
2012-02-20 15:35:45 +08:00
|
|
|
// CHECK: @llvm.x86.3dnowa.pswapd
|
|
|
|
return _m_pswapdsi(m);
|
|
|
|
}
|