Hi Jeff, Robin,

This morning I was talking about the following test where subreg promoted is not being generated during expand, whereas for RISC-V ABI/ISA it should.

gcc.c-torture/compile/20070121.c -Os -march=rv64gc -mabi=lp64d

expand_gimple_basic_block
    expand_gimple_stmt
...
        expand_expr_real
...
             case SSA_NAME:
                  if (REG_P (decl_rtl)
                      && dmode != BLKmode
                      && GET_MODE (decl_rtl) != dmode)

Here it seems to be taking promote_ssa_mode () codepath and not promote_function_mode

Do note this only happens for -Os. Tree dump is same for both -Os and -O2, Expand for -Os misses setting the subreg promoted.

Thx,
-Vineet

Reply via email to