https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121571
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Vladimir Makarov from comment #7)
> (In reply to Jakub Jelinek from comment #6)
> > -m32 -march=skylake-avx512 -Os
> > int a, b, c, d, e, f;
> >
> > void
> > foo ()
> > {
> > int g[2] = { e, f };
> > if ((g[0] | g[1]) != 0)
> > __asm__ (""
> > : "=r" (d), "=&r" (c), "=&r" (b), "=&r" (a)
> > : "0" (0), "g" (g), "g" (g[1]), "g" (g[0]));
> > }
> > Started with r15-9176-g564e4e0819022925dd160e455ee44baf0fda5805
>
> The compiler gives the right diagnostics. There are not enough registers
> for this test case. For -Os we have only six available integer regs. The
> insn requires 7 regs (3 for early clobbers and 4 for inputs).
>
> Using -fno-omit-frame-pointer with -Os frees one more reg (bp) and GCC
> successfully compiles the test.
Doesn't it require just 5? All of (g), (g[1]) and (g[0]) can be a MEM, all
using %esp + offset? Or even if it wasn't %esp based, it can use the same base
register to address all 3.