Just use a native "load" instead of translating the builtin later. Clang can
take it! I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned load...I'll have to look into it further. llvm-svn: 129427
This commit is contained in:
parent
efc283c076
commit
b9c9e34cb3
|
@ -2092,8 +2092,6 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
|
||||||
// If palignr is shifting the pair of vectors more than 32 bytes, emit zero.
|
// If palignr is shifting the pair of vectors more than 32 bytes, emit zero.
|
||||||
return llvm::Constant::getNullValue(ConvertType(E->getType()));
|
return llvm::Constant::getNullValue(ConvertType(E->getType()));
|
||||||
}
|
}
|
||||||
case X86::BI__builtin_ia32_loadups:
|
|
||||||
case X86::BI__builtin_ia32_loadupd:
|
|
||||||
case X86::BI__builtin_ia32_loaddqu: {
|
case X86::BI__builtin_ia32_loaddqu: {
|
||||||
const llvm::Type *VecTy = ConvertType(E->getType());
|
const llvm::Type *VecTy = ConvertType(E->getType());
|
||||||
const llvm::Type *IntTy = llvm::IntegerType::get(getLLVMContext(), 128);
|
const llvm::Type *IntTy = llvm::IntegerType::get(getLLVMContext(), 128);
|
||||||
|
|
|
@ -466,7 +466,7 @@ _mm_loadr_pd(double const *dp)
|
||||||
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
_mm_loadu_pd(double const *dp)
|
_mm_loadu_pd(double const *dp)
|
||||||
{
|
{
|
||||||
return __builtin_ia32_loadupd(dp);
|
return (__m128d){ dp[0], dp[1] };
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
|
||||||
|
|
|
@ -539,7 +539,7 @@ _mm_load_ps(const float *p)
|
||||||
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
_mm_loadu_ps(const float *p)
|
_mm_loadu_ps(const float *p)
|
||||||
{
|
{
|
||||||
return __builtin_ia32_loadups(p);
|
return (__m128){ p[0], p[1], p[2], p[3] }; /* __builtin_ia32_loadups(p); */
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
|
||||||
|
|
Loading…
Reference in New Issue