[cfe-commits] r116162 - in /cfe/trunk: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtins-x86.c
Chris Lattner
clattner at apple.com
Sat Oct 9 21:42:13 PDT 2010
On Oct 9, 2010, at 8:19 PM, Argyrios Kyrtzidis wrote:
> Author: akirtzidis
> Date: Sat Oct 9 22:19:11 2010
> New Revision: 116162
>
> URL: http://llvm.org/viewvc/llvm-project?rev=116162&view=rev
> Log:
> Implement __builtin_ia32_vec_ext_v2si function (required by Qt).
Hi Argiris,
Why can't they use the right intrinsic from xmmintrin.h? We prefer not to implement builtins like this, people are supposed to use the official documented interfaces in the *mmintrin.h files.
-Chris
>
> Modified:
> cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> cfe/trunk/test/CodeGen/builtins-x86.c
>
> Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=116162&r1=116161&r2=116162&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Sat Oct 9 22:19:11 2010
> @@ -2002,6 +2002,9 @@
> case X86::BI__builtin_ia32_vec_init_v2si:
> return Builder.CreateBitCast(BuildVector(Ops),
> llvm::Type::getX86_MMXTy(VMContext));
> + case X86::BI__builtin_ia32_vec_ext_v2si:
> + return Builder.CreateExtractElement(Ops[0],
> + llvm::ConstantInt::get(Ops[1]->getType(), 0));
> case X86::BI__builtin_ia32_pslldi:
> case X86::BI__builtin_ia32_psllqi:
> case X86::BI__builtin_ia32_psllwi:
>
> Modified: cfe/trunk/test/CodeGen/builtins-x86.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/builtins-x86.c?rev=116162&r1=116161&r2=116162&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGen/builtins-x86.c (original)
> +++ cfe/trunk/test/CodeGen/builtins-x86.c Sat Oct 9 22:19:11 2010
> @@ -261,6 +261,7 @@
> tmp_V8c = __builtin_ia32_packsswb(tmp_V4s, tmp_V4s);
> tmp_V4s = __builtin_ia32_packssdw(tmp_V2i, tmp_V2i);
> tmp_V8c = __builtin_ia32_packuswb(tmp_V4s, tmp_V4s);
> + tmp_i = __builtin_ia32_vec_ext_v2si(tmp_V2i, 0);
>
> (void) __builtin_ia32_ldmxcsr(tmp_Ui);
> tmp_Ui = __builtin_ia32_stmxcsr();
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list