]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Remove useless copy_rtx in rs6000_emit_set_{,long}_const
authorJiufu Guo <guojiufu@linux.ibm.com>
Fri, 9 Dec 2022 05:50:37 +0000 (13:50 +0800)
committerJiufu Guo <guojiufu@linux.ibm.com>
Fri, 9 Dec 2022 11:19:39 +0000 (19:19 +0800)
commit71b31d13757ae0f544651c29b113ccf120573760
treed5db2dbc11f6943119103a3aa5eb28f4653cfaf0
parent96cb786b754919f41dc7de9566a68ed25a4bf3fa
rs6000: Remove useless copy_rtx in rs6000_emit_set_{,long}_const

Function rs6000_emit_set_const/rs6000_emit_set_long_const are only invoked from
two "define_split"s where the target operand is limited to gpc_reg_operand or
int_reg_operand, then the operand must be REG_P.
And in rs6000_emit_set_const/rs6000_emit_set_long_const, to create temp rtx,
it is using code like "gen_reg_rtx({S|D}Imode)", it must also be REG_P.
So, copy_rtx is not needed for temp and dest.

This patch removes those "copy_rtx" for rs6000_emit_set_const and
rs6000_emit_set_long_const.

gcc/ChangeLog:

* config/rs6000/rs6000.cc (rs6000_emit_set_const): Remove copy_rtx.
(rs6000_emit_set_long_const): Likewise.
gcc/config/rs6000/rs6000.cc