[PowerPC] Handle __builtin_xxpermdi the same way as GCC does
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 19 Jul 2018 12:44:15 +0000 (12:44 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Thu, 19 Jul 2018 12:44:15 +0000 (12:44 +0000)
commit1ac56bd33f0305cdfc8df9595409070a0d2ebb52
tree0a2e00274380cf457c32be974ecb50a20d426753
parent7fbf06c10ba87bc1e1856b38876303e0b11582b3
[PowerPC] Handle __builtin_xxpermdi the same way as GCC does

The codegen for this builtin was initially implemented to match GCC.
However, due to interest from users GCC changed behaviour to account for the
big endian bias of the instruction and correct it. This patch brings the
handling inline with GCC.

Fixes https://bugs.llvm.org/show_bug.cgi?id=38192

Differential Revision: https://reviews.llvm.org/D49424

llvm-svn: 337449
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/builtins-ppc-vsx.c