diff options
author | Nate Begeman <natebegeman@mac.com> | 2009-12-14 05:15:02 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2009-12-14 05:15:02 +0000 |
commit | c3420ffb282c6ffc0192013bf8045b6c21eddece (patch) | |
tree | 15555824acdc141dba9403810878b13447b19c2e /lib | |
parent | 83d4c969a015a14615b1af56423d02c2381ba240 (diff) |
Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/CGBuiltin.cpp | 5 | ||||
-rw-r--r-- | lib/Headers/tmmintrin.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 5d5caa2e9a..c70443245c 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -805,8 +805,11 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID, Ops[0] = Builder.CreateBitCast(Ops[0], PtrTy); return Builder.CreateStore(Ops[1], Ops[0]); } - case X86::BI__builtin_ia32_palignr128: case X86::BI__builtin_ia32_palignr: { + Function *F = CGM.getIntrinsic(Intrinsic::x86_ssse3_palign_r); + return Builder.CreateCall(F, &Ops[0], &Ops[0] + Ops.size()); + } + case X86::BI__builtin_ia32_palignr128: { unsigned shiftVal = cast<llvm::ConstantInt>(Ops[2])->getZExtValue(); // If palignr is shifting the pair of input vectors less than 17 bytes, diff --git a/lib/Headers/tmmintrin.h b/lib/Headers/tmmintrin.h index 374a27ecd7..7adb776fef 100644 --- a/lib/Headers/tmmintrin.h +++ b/lib/Headers/tmmintrin.h @@ -67,7 +67,7 @@ _mm_abs_epi32(__m128i a) } #define _mm_alignr_epi8(a, b, n) (__builtin_ia32_palignr128((a), (b), (n))) -#define _mm_alignr_pi8(a, b, n) (__builtin_ia32_palignr((a), (b), (n))) +#define _mm_alignr_pi8(a, b, n) (__builtin_ia32_palignr((a), (b), (n*8))) static inline __m128i __attribute__((__always_inline__, __nodebug__)) _mm_hadd_epi16(__m128i a, __m128i b) |