http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51033

--- Comment #19 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-22 
10:31:33 UTC ---
Created attachment 27217
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27217
shuffle

With this patch, g++ passes the few __builtin_shuffle tests I tried, and
generates generic code for non-constant indexes and special code for constant
indexes. I don't really know what to do about the testsuite. The tests exercise
the backend a lot, and it probably doesn't make sense to run everything with
both gcc and g++. But we still want to test that g++ accepts the syntax, and
maybe even that it handles constants well.

Content of the patch:
- move c_build_vec_perm_expr to c-common and condition the maybe_const stuff to
the dialect
- adapt the C RID_BUILTIN_SHUFFLE parser code to the C++ FE (the 2 are
different enough that it isn't easy to share)
- remove the C_ONLY tag from __builtin_shuffle

As usual, my limited knowledge of the compiler means I may have missed
fundamental things.

Reply via email to