[cfe-commits] r73022 - in /cfe/trunk: include/clang/AST/X86Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Headers/emmintrin.h test/CodeGen/builtins-x86.c
Eli Friedman
eli.friedman at gmail.com
Sun Jun 7 02:33:06 PDT 2009
Author: efriedma
Date: Sun Jun 7 04:32:56 2009
New Revision: 73022
URL: http://llvm.org/viewvc/llvm-project?rev=73022&view=rev
Log:
Remove a few more vector builtins.
Modified:
cfe/trunk/include/clang/AST/X86Builtins.def
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
cfe/trunk/lib/Headers/emmintrin.h
cfe/trunk/test/CodeGen/builtins-x86.c
Modified: cfe/trunk/include/clang/AST/X86Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/X86Builtins.def?rev=73022&r1=73021&r2=73022&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/X86Builtins.def (original)
+++ cfe/trunk/include/clang/AST/X86Builtins.def Sun Jun 7 04:32:56 2009
@@ -249,14 +249,11 @@
BUILTIN(__builtin_ia32_pmaddwd128, "V8sV8sV8s", "")
BUILTIN(__builtin_ia32_monitor, "vv*UiUi", "")
BUILTIN(__builtin_ia32_mwait, "vUiUi", "")
-BUILTIN(__builtin_ia32_movshdup, "V4fV4f", "")
-BUILTIN(__builtin_ia32_movsldup, "V4fV4f", "")
BUILTIN(__builtin_ia32_lddqu, "V16ccC*", "")
BUILTIN(__builtin_ia32_palignr128, "V2LLiV2LLiV2LLii", "")
BUILTIN(__builtin_ia32_palignr, "V1LLiV1LLiV1LLis", "")
BUILTIN(__builtin_ia32_insertps128, "V4fV4fV4fi", "")
-BUILTIN(__builtin_ia32_loadlv4si, "V4iV2i*", "")
BUILTIN(__builtin_ia32_storelv4si, "vV2i*V2LLi", "")
BUILTIN(__builtin_ia32_pblendvb128, "V16cV16cV16cV16c", "")
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=73022&r1=73021&r2=73022&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Sun Jun 7 04:32:56 2009
@@ -782,29 +782,6 @@
Ops[0] = Builder.CreateBitCast(Ops[0], PtrTy);
return Builder.CreateStore(Ops[1], Ops[0]);
}
- case X86::BI__builtin_ia32_loadlv4si: {
- // load i64
- const llvm::Type *EltTy = llvm::Type::Int64Ty;
- llvm::Type *PtrTy = llvm::PointerType::getUnqual(EltTy);
- Ops[0] = Builder.CreateBitCast(Ops[0], PtrTy);
- Ops[0] = Builder.CreateLoad(Ops[0], "load");
-
- // scalar to vector: insert i64 into 2 x i64 undef
- llvm::Type *VecTy = llvm::VectorType::get(EltTy, 2);
- llvm::Value *Zero = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0);
- Ops[0] = Builder.CreateInsertElement(llvm::UndefValue::get(VecTy),
- Ops[0], Zero, "s2v");
-
- // shuffle into zero vector.
- std::vector<llvm::Constant *>Elts;
- Elts.resize(2, llvm::ConstantInt::get(EltTy, 0));
- llvm::Value *ZV = ConstantVector::get(Elts);
- Ops[0] = EmitShuffleVector(ZV, Ops[0], 2, 1, "loadl");
-
- // bitcast to result.
- return Builder.CreateBitCast(Ops[0],
- llvm::VectorType::get(llvm::Type::Int32Ty, 4));
- }
}
}
Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=73022&r1=73021&r2=73022&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Sun Jun 7 04:32:56 2009
@@ -1020,7 +1020,7 @@
static inline __m128i __attribute__((__always_inline__, __nodebug__))
_mm_loadl_epi64(__m128i const *p)
{
- return (__m128i)__builtin_ia32_loadlv4si((__v2si *)p);
+ return (__m128i) { *(long long*)p, 0};
}
static inline __m128i __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=73022&r1=73021&r2=73022&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/builtins-x86.c (original)
+++ cfe/trunk/test/CodeGen/builtins-x86.c Sun Jun 7 04:32:56 2009
@@ -325,14 +325,9 @@
tmp_V8s = __builtin_ia32_pmaddwd128(tmp_V8s, tmp_V8s);
(void) __builtin_ia32_monitor(tmp_vp, tmp_Ui, tmp_Ui);
(void) __builtin_ia32_mwait(tmp_Ui, tmp_Ui);
-#ifdef USE_ALL
- tmp_V4f = __builtin_ia32_movshdup(tmp_V4f);
- tmp_V4f = __builtin_ia32_movsldup(tmp_V4f);
-#endif
tmp_V16c = __builtin_ia32_lddqu(tmp_cCp);
tmp_V2LLi = __builtin_ia32_palignr128(tmp_V2LLi, tmp_V2LLi, imm_i);
tmp_V1LLi = __builtin_ia32_palignr(tmp_V1LLi, tmp_V1LLi, imm_i);
- tmp_V4i = __builtin_ia32_loadlv4si(tmp_V2ip);
(void) __builtin_ia32_storelv4si(tmp_V2ip, tmp_V2LLi);
#ifdef USE_SSE4
tmp_V16c = __builtin_ia32_pblendvb128(tmp_V16c, tmp_V16c, tmp_V16c);
More information about the cfe-commits
mailing list