[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

Kamau Bridgeman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 15:01:13 PDT 2023


kamaub added a comment.

Can you add a PowerPC codegen test case for `__attribute__((target(`? All of the updated test cases seem to only test `-target-feature`.
The only test case we have for `__attribute((target(` is a sema test `./clang/test/Sema/ppc-attr-target-inline.c`.

Converting the deleted `clang/test/Sema/ppc-mma-builtins.c` and `clang/test/Sema/ppc-paired-vector-builtins.c` to a codegen test cases
like `clang/test/CodeGen/PowerPC/builtins-ppc-htm.c` using FileCheck seems like a nice solution since it would reintroduce the testing
for `+paired-vector-memops,-mma` situations, as well as a for `__attribute__((target("no-mma")))`



================
Comment at: clang/include/clang/Basic/BuiltinsPPC.def:987
+
+UNALIASED_CUSTOM_BUILTIN(mma_assemble_acc, "vW512*VVVV", false, "mma")
+UNALIASED_CUSTOM_BUILTIN(mma_disassemble_acc, "vv*W512*", false, "mma")
----------------
stefanp wrote:
> Based on the original implementation in `SemaBuiltinPPCMMACall` all of the `mma` builtins also require `paired-vector-memops`. 
> Is this something that we still need?
since we are able to supply a comma separated list as done with `TARGET_BUILTIN(__builtin_ppc_compare_exp_uo, "idd", "", "isa-v30-instructions,vsx")` @ `clang/include/clang/Basic/BuiltinsPPC.def:105`we should definitely also specify `paired-vector-memops,mma` for the `[UNALIASED_]CUSTOM_BUILTIN`s previously covered under the default case of `SemaBuiltinPPCMMACall()` 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143467/new/

https://reviews.llvm.org/D143467



More information about the cfe-commits mailing list