[cfe-dev] __builtin_shufflevector question

Craig Topper craig.topper at gmail.com
Thu Jul 18 21:58:55 PDT 2013


What are the supported forms of __builtin_shufflevector supposed to be?

Comments in SemaChecking.cpp indicates these
  // 1) unary, vector mask: (lhs, mask)
  // 2) binary, vector mask: (lhs, rhs, mask)
  // 3) binary, scalar mask: (lhs, rhs, index, ..., index)

But the actual code in SemaChecking.cpp only implements 1 and 3. I tried to
use 2 and it fails with "index for __builtin_shufflevector must be a
constant integer" on the 3rd argument.


Additionally, official documentation indicates only form 3 is supported.
http://clang.llvm.org/docs/LanguageExtensions.html

-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130718/e5e148f2/attachment.html>


More information about the cfe-dev mailing list