On Aug 30, 2011, at 10:01 AM, Artem Shinkarov wrote: >>> The patch at the moment lacks of some examples, but mainly it works >>> fine for me. It would be nice if i386 gurus could look into the way I >>> am doing the expansion. >>> >>> Middle-end parts seems to be more or less fine, they have not changed >>> much from the previous time. >> >> +@code{__builtin_shuffle (vec, mask)} and >> +@code{__builtin_shuffle (vec0, vec1, mask)}. Both functions construct >> >> the latter would be __builtin_shuffle2. > > Why?? > That was the syntax we agreed on that elegantly handles both cases in one > place.
If you're going to add vector shuffling builtins, you might consider adding the same builtin that clang has for compatibility: http://clang.llvm.org/docs/LanguageExtensions.html#__builtin_shufflevector It should be straight-forward to map it into the same IR. -Chris