[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-19 Thread Nemanja Ivanovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337449: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does (authored by nemanjai, committed by ). Changed prior to commit: https://reviews.llvm.org/D49424?vs=155869&id=156251#toc Repository:

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10781 // endian platforms (i.e. index is complemented and source vector reversed). -unsigned ElemIdx0; -unsigned ElemIdx1; -if (getTarget().isLittleEndian()) { - ElemIdx0 = (~Index & 1) +

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10780 // endian order so the shuffle mask must be adjusted for this on little // endian platforms (i.e. index is complemented and source vector reversed). +unsigned ElemIdx0 = (Index & 2) >> 1;;

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10780 // endian order so the shuffle mask must be adjusted for this on little // endian platforms (i.e. index is complemented and source vector reversed). +unsigned ElemIdx0 = (Index & 2) >> 1;;

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Luca Barbato via Phabricator via cfe-commits
lu-zero accepted this revision. lu-zero added a comment. This revision is now accepted and ready to land. Looks good, thank you! Repository: rC Clang https://reviews.llvm.org/D49424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: lu-zero, hfinkel. Herald added a subscriber: kbarton. 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