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:
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) +
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;;
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;;
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
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