https://gcc.gnu.org/g:d2c42fc69baa3eaf5271391cdae2b4eaf686351e
commit d2c42fc69baa3eaf5271391cdae2b4eaf686351e Author: Kishan Parmar <[email protected]> Date: Mon Jul 6 19:03:51 2026 +0530 rs6000: Add Dense Math register predicate Add a new predicate, dmr_register_operand, to recognize Dense Math register operands. Also update gpc_reg_operand to accept Dense Math registers when Dense Math support is enabled. Diff: --- gcc/config/rs6000/predicates.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 63588ff99613..b49c6cbcb39a 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -163,6 +163,22 @@ return VINT_REGNO_P (REGNO (op)); }) +;; Return 1 if op is a dense math register +(define_predicate "dmr_register_operand" + (match_operand 0 "register_operand") +{ + if (!TARGET_DMF) + return 0; + + if (!REG_P (op)) + return 0; + + if (!HARD_REGISTER_P (op)) + return 1; + + return DM_REGNO_P (REGNO (op)); +}) + ;; Return 1 if op is an accumulator. On power10/11 systems, the accumulators ;; overlap with the FPRs. On future systems, it will be a separate set of ;; registers. @@ -388,6 +404,9 @@ if (TARGET_VSX && VSX_REGNO_P (REGNO (op))) return 1; + if (TARGET_DENSE_MATH && DMR_REGNO_P (REGNO (op))) + return 1; + return INT_REGNO_P (REGNO (op)) || FP_REGNO_P (REGNO (op)); })
