[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 09:26:31 PDT 2025
================
@@ -1617,10 +1617,14 @@ class VX_VT5_EO5_VB5_XO9_o<bits<5> eo, bits<9> xo, string opc,
}
// Decimal Convert From/to National/Zoned/Signed-QWord
-def BCDCFN_rec : VX_VT5_EO5_VB5_PS1_XO9_o<7, 385, "bcdcfn." , []>;
-def BCDCFZ_rec : VX_VT5_EO5_VB5_PS1_XO9_o<6, 385, "bcdcfz." , []>;
-def BCDCTN_rec : VX_VT5_EO5_VB5_XO9_o <5, 385, "bcdctn." , []>;
-def BCDCTZ_rec : VX_VT5_EO5_VB5_PS1_XO9_o<4, 385, "bcdctz." , []>;
+def BCDCFN_rec : VX_VT5_EO5_VB5_PS1_XO9_o<7, 385, "bcdcfn." ,
+ [(set v16i8:$VD, (int_ppc_national2packed v16i8:$VB, i32:$PS))]>;
+def BCDCFZ_rec : VX_VT5_EO5_VB5_PS1_XO9_o<6, 385, "bcdcfz." ,
+ [(set v16i8:$VD, (int_ppc_zoned2packed v16i8:$VB, i32:$PS))]>;
+def BCDCTN_rec : VX_VT5_EO5_VB5_XO9_o <5, 385, "bcdctn." ,
+ [(set v16i8:$VD, (int_ppc_packed2national v16i8:$VB))]>;
+def BCDCTZ_rec : VX_VT5_EO5_VB5_PS1_XO9_o<4, 385, "bcdctz." ,
+ [(set v16i8:$VD, (int_ppc_packed2zoned v16i8:$VB, i32:$PS))]>;
----------------
Himadhith wrote:
Yes we can use the immediate instruction, although it would have to be `timm`.
https://github.com/llvm/llvm-project/pull/142723
More information about the llvm-commits
mailing list