[cfe-commits] r129427 - in /cfe/trunk/lib: CodeGen/CGBuiltin.cpp Headers/emmintrin.h Headers/xmmintrin.h

Bill Wendling isanbard at gmail.com
Tue Apr 12 22:58:17 PDT 2011


Author: void
Date: Wed Apr 13 00:58:17 2011
New Revision: 129427

URL: http://llvm.org/viewvc/llvm-project?rev=129427&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp
    cfe/trunk/lib/Headers/emmintrin.h
    cfe/trunk/lib/Headers/xmmintrin.h

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=129427&r1=129426&r2=129427&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Apr 13 00:58:17 2011
@@ -2092,8 +2092,6 @@
     // If palignr is shifting the pair of vectors more than 32 bytes, emit zero.
     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: {
     const llvm::Type *VecTy = ConvertType(E->getType());
     const llvm::Type *IntTy = llvm::IntegerType::get(getLLVMContext(), 128);

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=129427&r1=129426&r2=129427&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Wed Apr 13 00:58:17 2011
@@ -466,7 +466,7 @@
 static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
 _mm_loadu_pd(double const *dp)
 {
-  return __builtin_ia32_loadupd(dp);
+  return (__m128d){ dp[0], dp[1] };
 }
 
 static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))

Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=129427&r1=129426&r2=129427&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Wed Apr 13 00:58:17 2011
@@ -539,7 +539,7 @@
 static __inline__ __m128 __attribute__((__always_inline__, __nodebug__))
 _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__))





More information about the cfe-commits mailing list