This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Handle __builtin_xxpermdi the same way as GCC does
ClosedPublic

Authored by nemanjai on Jul 17 2018, 6:29 AM.

Details

Summary

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.

Diff Detail

Repository
rC Clang

Event Timeline

nemanjai created this revision.Jul 17 2018, 6:29 AM
lu-zero accepted this revision.Jul 17 2018, 6:45 AM

Looks good, thank you!

This revision is now accepted and ready to land.Jul 17 2018, 6:45 AM
efriedma added inline comments.
lib/CodeGen/CGBuiltin.cpp
10833–10834

Please fix the comment.

nemanjai added inline comments.Jul 17 2018, 4:27 PM
lib/CodeGen/CGBuiltin.cpp
10833–10834

Ah yes. Good catch. Thanks Eli. I'll fix up the comment on the commit.

sfertile added inline comments.
lib/CodeGen/CGBuiltin.cpp
10834–10838

There is an extra ;on each line.

This revision was automatically updated to reflect the committed changes.