[cfe-commits] r149233 - in /cfe/trunk: include/clang/Basic/BuiltinsX86.def lib/CodeGen/CGBuiltin.cpp lib/Headers/mm3dnow.h test/CodeGen/builtins-x86.c
Craig Topper
craig.topper at gmail.com
Mon Jan 30 00:18:19 PST 2012
Author: ctopper
Date: Mon Jan 30 02:18:19 2012
New Revision: 149233
URL: http://llvm.org/viewvc/llvm-project?rev=149233&view=rev
Log:
Cleanup 3dnow builtin handling. Most of them were already handled by LLVM connecting intrinsics and builtins in IntrinsicsX86.td.
Modified:
cfe/trunk/include/clang/Basic/BuiltinsX86.def
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
cfe/trunk/lib/Headers/mm3dnow.h
cfe/trunk/test/CodeGen/builtins-x86.c
Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=149233&r1=149232&r2=149233&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Mon Jan 30 02:18:19 2012
@@ -42,8 +42,6 @@
BUILTIN(__builtin_ia32_pfrcpit2, "V2fV2fV2f", "nc")
BUILTIN(__builtin_ia32_pfrsqrt, "V2fV2f", "nc")
BUILTIN(__builtin_ia32_pfrsqit1, "V2fV2fV2f", "nc")
-// GCC has pfrsqrtit1, even though this is not the name of the instruction.
-BUILTIN(__builtin_ia32_pfrsqrtit1, "V2fV2fV2f", "nc")
BUILTIN(__builtin_ia32_pfsub, "V2fV2fV2f", "nc")
BUILTIN(__builtin_ia32_pfsubr, "V2fV2fV2f", "nc")
BUILTIN(__builtin_ia32_pi2fd, "V2fV2i", "nc")
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=149233&r1=149232&r2=149233&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Mon Jan 30 02:18:19 2012
@@ -2343,128 +2343,12 @@
return SI;
}
// 3DNow!
- case X86::BI__builtin_ia32_pavgusb:
- case X86::BI__builtin_ia32_pf2id:
- case X86::BI__builtin_ia32_pfacc:
- case X86::BI__builtin_ia32_pfadd:
- case X86::BI__builtin_ia32_pfcmpeq:
- case X86::BI__builtin_ia32_pfcmpge:
- case X86::BI__builtin_ia32_pfcmpgt:
- case X86::BI__builtin_ia32_pfmax:
- case X86::BI__builtin_ia32_pfmin:
- case X86::BI__builtin_ia32_pfmul:
- case X86::BI__builtin_ia32_pfrcp:
- case X86::BI__builtin_ia32_pfrcpit1:
- case X86::BI__builtin_ia32_pfrcpit2:
- case X86::BI__builtin_ia32_pfrsqrt:
- case X86::BI__builtin_ia32_pfrsqit1:
- case X86::BI__builtin_ia32_pfrsqrtit1:
- case X86::BI__builtin_ia32_pfsub:
- case X86::BI__builtin_ia32_pfsubr:
- case X86::BI__builtin_ia32_pi2fd:
- case X86::BI__builtin_ia32_pmulhrw:
- case X86::BI__builtin_ia32_pf2iw:
- case X86::BI__builtin_ia32_pfnacc:
- case X86::BI__builtin_ia32_pfpnacc:
- case X86::BI__builtin_ia32_pi2fw:
case X86::BI__builtin_ia32_pswapdsf:
case X86::BI__builtin_ia32_pswapdsi: {
const char *name = 0;
Intrinsic::ID ID = Intrinsic::not_intrinsic;
switch(BuiltinID) {
- case X86::BI__builtin_ia32_pavgusb:
- name = "pavgusb";
- ID = Intrinsic::x86_3dnow_pavgusb;
- break;
- case X86::BI__builtin_ia32_pf2id:
- name = "pf2id";
- ID = Intrinsic::x86_3dnow_pf2id;
- break;
- case X86::BI__builtin_ia32_pfacc:
- name = "pfacc";
- ID = Intrinsic::x86_3dnow_pfacc;
- break;
- case X86::BI__builtin_ia32_pfadd:
- name = "pfadd";
- ID = Intrinsic::x86_3dnow_pfadd;
- break;
- case X86::BI__builtin_ia32_pfcmpeq:
- name = "pfcmpeq";
- ID = Intrinsic::x86_3dnow_pfcmpeq;
- break;
- case X86::BI__builtin_ia32_pfcmpge:
- name = "pfcmpge";
- ID = Intrinsic::x86_3dnow_pfcmpge;
- break;
- case X86::BI__builtin_ia32_pfcmpgt:
- name = "pfcmpgt";
- ID = Intrinsic::x86_3dnow_pfcmpgt;
- break;
- case X86::BI__builtin_ia32_pfmax:
- name = "pfmax";
- ID = Intrinsic::x86_3dnow_pfmax;
- break;
- case X86::BI__builtin_ia32_pfmin:
- name = "pfmin";
- ID = Intrinsic::x86_3dnow_pfmin;
- break;
- case X86::BI__builtin_ia32_pfmul:
- name = "pfmul";
- ID = Intrinsic::x86_3dnow_pfmul;
- break;
- case X86::BI__builtin_ia32_pfrcp:
- name = "pfrcp";
- ID = Intrinsic::x86_3dnow_pfrcp;
- break;
- case X86::BI__builtin_ia32_pfrcpit1:
- name = "pfrcpit1";
- ID = Intrinsic::x86_3dnow_pfrcpit1;
- break;
- case X86::BI__builtin_ia32_pfrcpit2:
- name = "pfrcpit2";
- ID = Intrinsic::x86_3dnow_pfrcpit2;
- break;
- case X86::BI__builtin_ia32_pfrsqrt:
- name = "pfrsqrt";
- ID = Intrinsic::x86_3dnow_pfrsqrt;
- break;
- case X86::BI__builtin_ia32_pfrsqit1:
- case X86::BI__builtin_ia32_pfrsqrtit1:
- name = "pfrsqit1";
- ID = Intrinsic::x86_3dnow_pfrsqit1;
- break;
- case X86::BI__builtin_ia32_pfsub:
- name = "pfsub";
- ID = Intrinsic::x86_3dnow_pfsub;
- break;
- case X86::BI__builtin_ia32_pfsubr:
- name = "pfsubr";
- ID = Intrinsic::x86_3dnow_pfsubr;
- break;
- case X86::BI__builtin_ia32_pi2fd:
- name = "pi2fd";
- ID = Intrinsic::x86_3dnow_pi2fd;
- break;
- case X86::BI__builtin_ia32_pmulhrw:
- name = "pmulhrw";
- ID = Intrinsic::x86_3dnow_pmulhrw;
- break;
- case X86::BI__builtin_ia32_pf2iw:
- name = "pf2iw";
- ID = Intrinsic::x86_3dnowa_pf2iw;
- break;
- case X86::BI__builtin_ia32_pfnacc:
- name = "pfnacc";
- ID = Intrinsic::x86_3dnowa_pfnacc;
- break;
- case X86::BI__builtin_ia32_pfpnacc:
- name = "pfpnacc";
- ID = Intrinsic::x86_3dnowa_pfpnacc;
- break;
- case X86::BI__builtin_ia32_pi2fw:
- name = "pi2fw";
- ID = Intrinsic::x86_3dnowa_pi2fw;
- break;
+ default: llvm_unreachable("Unsupported intrinsic!");
case X86::BI__builtin_ia32_pswapdsf:
case X86::BI__builtin_ia32_pswapdsi:
name = "pswapd";
Modified: cfe/trunk/lib/Headers/mm3dnow.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/mm3dnow.h?rev=149233&r1=149232&r2=149233&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/mm3dnow.h (original)
+++ cfe/trunk/lib/Headers/mm3dnow.h Mon Jan 30 02:18:19 2012
@@ -105,7 +105,7 @@
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
_m_pfrsqrtit1(__m64 __m1, __m64 __m2) {
- return (__m64)__builtin_ia32_pfrsqrtit1((__v2sf)__m1, (__v2sf)__m2);
+ return (__m64)__builtin_ia32_pfrsqit1((__v2sf)__m1, (__v2sf)__m2);
}
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
Modified: cfe/trunk/test/CodeGen/builtins-x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-x86.c?rev=149233&r1=149232&r2=149233&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-x86.c (original)
+++ cfe/trunk/test/CodeGen/builtins-x86.c Mon Jan 30 02:18:19 2012
@@ -486,7 +486,6 @@
tmp_V2f = __builtin_ia32_pfrcpit2(tmp_V2f, tmp_V2f);
tmp_V2f = __builtin_ia32_pfrsqrt(tmp_V2f);
tmp_V2f = __builtin_ia32_pfrsqit1(tmp_V2f, tmp_V2f);
- tmp_V2f = __builtin_ia32_pfrsqrtit1(tmp_V2f, tmp_V2f);
tmp_V2f = __builtin_ia32_pfsub(tmp_V2f, tmp_V2f);
tmp_V2f = __builtin_ia32_pfsubr(tmp_V2f, tmp_V2f);
tmp_V2f = __builtin_ia32_pi2fd(tmp_V2i);
More information about the cfe-commits
mailing list