https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791

--- Comment #7 from amker at gcc dot gnu.org ---
So dump of optimized pass is:
;; Function f (f, funcdef_no=0, decl_uid=2557, cgraph_uid=0, symbol_order=1)

Removing basic block 5
__attribute__((noinline))
f (int m)
{
  int sh;
  int i;
  sizetype _3;
  void * _4;
  unsigned int _17;
  unsigned int _18;

  <bb 2> [15.00%]:

  <bb 3> [100.00%]:
  # i_5 = PHI <m_8(D)(2), i_12(3)>
  # sh_6 = PHI <256(2), sh_10(3)>
  _18 = (unsigned int) i_5;
  _17 = _18 * 8;
  _3 = (sizetype) _17;
  sh_10 = sh_6 >> 1;
  _4 = &a + _3;
  a[sh_10] = _4;
  i_12 = i_5 + 4;
  if (i_12 <= 1073741839)
    goto <bb 3>; [85.00%]
  else
    goto <bb 4>; [15.00%]

  <bb 4> [15.00%]:
  return;

}

During expanding:
;; i_12 = i_5 + 4;

(insn 18 17 19 (set (reg:SI 169)
        (plus:SI (subreg/s/u:SI (reg/v:DI 160 [ m ]) 0)
            (const_int 4 [0x4]))) "sms-1.c":22 -1
     (nil))

(insn 19 18 0 (set (reg/v:DI 160 [ m ])
        (sign_extend:DI (reg:SI 169))) "sms-1.c":22 -1
     (nil))

Why a int add is expanded into subreg/sign_extend?  Because of 64 bit
registers?

Reply via email to