On Tue, Jul 14, 2026 at 08:04:14PM +0530, Kishan Parmar wrote: > Hello, > > Below patch is bootstrapped and regtested on Power64le-linux-gnu. > > Thank You, > Kishan > > A future PowerPC processor may provide the Dense Math Facility (DMF), > where accumulators are backed by dedicated Dense Math Registers (DMRs) > instead of aliased VSX/FPR registers. Since DMRs do not require > priming or depriming, xxmtacc/xxmfacc become no-op operations. > > Update accumulator assembly to build accumulators in DMRs using DMR > insert operations instead of relying on aliased VSX/FPR registers. > Enable the required OOmode VSX pair patterns under TARGET_DMF and avoid > emitting xxmtacc/xxmfacc during internal accumulator moves and GIMPLE > folding when DMF is enabled. > > This patch depends on the following prerequisite patches and can be > upstream after they have been upstreamed: > > rs6000: Add support for Dense Math Facility (DMF) registers > https://patchwork.ozlabs.org/project/gcc/patch/ > [email protected]/ > > rs6000: Add the __dmr1024 opaque type > https://patchwork.ozlabs.org/project/gcc/patch/ > [email protected]/ > > rs6000: Add %wD constraint and predicate for accumulators > https://patchwork.ozlabs.org/project/gcc/patch/ > [email protected]/ > > [PATCH v3] rs6000: Add Dense Math builtin infrastructure > https://patchwork.ozlabs.org/project/gcc/patch/ > [email protected]/ > > [PATCH v2] rs6000: Add Dense Math (DMF/MMA+) built-in/instruction > support > https://patchwork.ozlabs.org/project/gcc/patch/ > [email protected]/ > > 2026-07-14 Kishan Parmar <[email protected]> > > gcc/ChangeLog: > * config/rs6000/mma.md (movoo): Enable for TARGET_DMF. > (*movoo): Likewise. > (vsx_assemble_pair): Likewise. > (*vsx_assemble_pair): Likewise. > (vsx_disassemble_pair): Likewise. > (*vsx_disassemble_pair): Likewise. > (mma_assemble_acc): Use accumulator_operand. > Build accumulators via DMR insert operations when TARGET_DMF. > (*mma_assemble_acc): Use accumulator_operand. > (mma_<acc>): New define_expand treating xxmtacc/xxmfacc as no-ops > for TARGET_DMF. > (*mma_<acc>): Restrict to !TARGET_DMF and use accumulator_operand. > (mma_disassemble_acc): Use accumulator_operand. > * config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_mma_builtin): Do > not emit xxmfacc for DISASSEMBLE_ACC when TARGET_DMF. > * config/rs6000/rs6000.cc (rs6000_hard_regno_mode_ok_uncached): Allow > OOmode in VSX register pairs for TARGET_DMF. > (rs6000_split_multireg_move): Avoid emitting xxmtacc/xxmfacc when > TARGET_DMF. > > gcc/testsuite/ChangeLog: > * gcc.target/powerpc/future-dmf-xxacc.c: New test. > * gcc.target/powerpc/future-nodmf-xxacc.c: New test.
The patch itself is ok for submission to the master branch once you update the comment and commit message. I agree with Peter that you should consider rewording the comments and commit message to say that xxmtacc and xxmfacc are not needed if dense math registers are enabled, but xxmtacc and xxmfacc are not nops if dense math registers are not enabled. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: [email protected]
