This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Reorder masked builtin operands. Use clang_builtin_alias for all overloaded vector builtins.
ClosedPublic

Authored by craig.topper on May 1 2021, 2:13 PM.

Details

Summary

This patch makes the builtin operand order match the C operand order
for all intrinsics. With this we can use clang_builtin_alias for
all overloaded intrinsics.

This should further reduce the test time for vector intrinsics.

Diff Detail

Event Timeline

craig.topper created this revision.May 1 2021, 2:13 PM
craig.topper requested review of this revision.May 1 2021, 2:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2021, 2:13 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
craig.topper added inline comments.May 1 2021, 2:16 PM
clang/include/clang/Basic/riscv_vector.td
192

I remove this and added a couple ManualCodeGen blocks to permute builtin to IR intrinsics operand order to make up for it. I could have used PermuteOperands but then we would have had to translate it into C code to do the permutation in CGBuiltin.cpp.

craig.topper retitled this revision from [RISCV] Reoreder masked builtin operands. Use clang_builtin_alias for all overloaded vector builtins. to [RISCV] Reorder masked builtin operands. Use clang_builtin_alias for all overloaded vector builtins..May 1 2021, 2:37 PM
khchen accepted this revision.May 2 2021, 6:04 AM

LGTM. Thanks for improvement!

clang/include/clang/Basic/riscv_vector.td
192

Cool, using ManualCodeGen is more simple.

This revision is now accepted and ready to land.May 2 2021, 6:04 AM