[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)
Lei Huang via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 10:47:32 PST 2025
================
@@ -582,6 +582,11 @@ TARGET_BUILTIN(__builtin_ppc_bcdsub_p, "iiV16UcV16Uc", "",
// P9 Binary-coded decimal (BCD) builtins.
TARGET_BUILTIN(__builtin_ppc_bcdcopysign, "V16UcV16UcV16Uc", "", "power9-vector")
TARGET_BUILTIN(__builtin_ppc_bcdsetsign, "V16UcV16UcUc", "t", "power9-vector")
+TARGET_BUILTIN(__builtin_ppc_bcdshift, "V16UcV16UciUc", "t", "power9-vector")
+TARGET_BUILTIN(__builtin_ppc_bcdshiftround, "V16UcV16UciUc", "t", "power9-vector")
+TARGET_BUILTIN(__builtin_ppc_bcdtruncate, "V16UcV16UciUc", "t", "power9-vector")
----------------
lei137 wrote:
I'm guessing we are giving up signature checking cause we want to do custom checking for the range. Isn't this why we created the macro `UNALIASED_CUSTOM_BUILTIN`?
```suggestion
UNALIASED_CUSTOM_BUILTIN(ppc_bcdtruncate, "V16UcV16UciUc", false, "power9-vector")
```
https://github.com/llvm/llvm-project/pull/154715
More information about the llvm-commits
mailing list