> > > >> (insn 20 19 23 2 (set (reg/v:DI 200 [ val+-4 ]) > >> (sign_extend:DI (subreg:SI (reg/v:DI 200 [ val+-4 ]) 4))) > >> "/app/example.cpp":7:29 -1 > >> (nil)) > > Haven't had chance to compile and look at it properly, but this subreg > seems suspicious for MIPS, given the definition of TRULY_NOOP_TRUNCATION. > We should instead use a truncdisi2 to narrow reg:DI 200 to an SI register, > and then sign_extend it. > > This is easily missed in target-independent code because so few targets > define TRULY_NOOP_TRUNCATION. > > Where is the subreg being generated? >
It's from expand_assignment(tree to, tree from, bool nontemporal) in expr.cc. to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE); -- YunQiang Su