On Tue, Aug 18, 2026 at 12:48:55PM +0200, Richard Biener via Gcc wrote:
> I'd use unsigned short, it's important to not use an overly large data
> structure for those common lookups to reduce cache footprint. We
> could possibly even dynamically size the component from genmodes?
Yeah, I'd prefer that, emit a typedef/macro in insn-modes.h, say
MODE_UNIT_SIZE_TYPE, unsigned char or unsigned short depending in
whether all modes fit or don't fit into 255 bytes and use it for the
generated array too. Similar to how e.g. the CONST_MODE_* macros
are defined.
> > @@ -1884,6 +1885,11 @@ rs6000_hard_regno_mode_ok_uncached (int regno,
> > machine_mode mode)
> > else
> > return 0;
> > }
> > + /* QDOmode needs even/odd DMR register pairs. */
> > + if (mode == QDOmode)
> > + {
> > + return (TARGET_DMF && DMR_REGNO_P (regno) && (regno & 1) == 0);
> > + }
The GCC coding style here is to avoid the {}s around a single statement
body.
Jakub