[cfe-commits] r105589 - in /cfe/trunk/lib: CodeGen/CGExprScalar.cpp Sema/SemaChecking.cpp

Daniel Dunbar daniel at zuster.org
Tue Jun 15 08:09:57 PDT 2010


On Sat, Jun 12, 2010 at 10:10 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Jun 7, 2010, at 5:16 PM, Nate Begeman wrote:
>
>> Author: sampo
>> Date: Mon Jun  7 19:16:34 2010
>> New Revision: 105589
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=105589&view=rev
>> Log:
>> Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction.  This means it can now be used for vector truncation and concatenation.  This will be used for the ARM NEON implementation.

Is this better than adding an explicit __builtin_maskvector or so? The
implementation doesn't seem to be reusing much, and is much more
confusing to read.

If we are going to share the implementation, please update the Doxygen
docs on the shufflevector expr, and also it would be good to add some
predicates to check which "flavor" of shufflevector it is, to replace:
--
+  if (E->getNumSubExprs() == 2 ||
+      E->getNumSubExprs() == 3 && E->getExpr(2)->getType()->isVectorType()) {
--

> Hey Nate,
>
> Can you add a testcase (e.g. in test/CodeGen/builtinshufflevector.c) for this when you get a chance?

Also, please update the __builtin_shufflevector docs:
  http://clang.llvm.org/docs/LanguageExtensions.html#__builtin_shufflevector

 - Daniel

> -Chris
> _______________________________________________
> 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