[PATCH] D100482: [PowerPC] Provide MMA builtins for compatibility
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 27 03:56:52 PDT 2021
nemanjai requested changes to this revision.
nemanjai added a comment.
This revision now requires changes to proceed.
There may be something I am overlooking here, but I really don't think we need to or want to change the back end. Just add the new builtins to the front end as aliases to the existing ones and generate the same code from the front end.
Also, we will want this backported to 12.0.1. Please open a bugzilla bug that we can mark as blocking the release and add a link to that PR in this review.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15348
+ if (BuiltinID == PPC::BI__builtin_mma_disassemble_pair)
+ Intrinsic = Intrinsic::ppc_mma_disassemble_pair;
if (BuiltinID == PPC::BI__builtin_mma_disassemble_acc) {
----------------
The `_mma_` version of the builtin is supposed to just be an alias for the `_vsx_` version. There is no need to add a new intrinsic and produce it here. Just produce the same intrinsic for both builtins.
================
Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:1139
Intrinsic<[llvm_v256i1_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
+def int_ppc_mma_lxvp :
+ Intrinsic<[llvm_v256i1_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>;
----------------
Please don't define these unless we absolutely need them.
If we don't add these, I think all the code in the back end is no longer needed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100482/new/
https://reviews.llvm.org/D100482
More information about the llvm-commits
mailing list