]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make more use of int_mode_for_mode
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Sep 2017 19:56:49 +0000 (19:56 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 5 Sep 2017 19:56:49 +0000 (19:56 +0000)
commite2cd4ccd1e0d88d4fa9ab9b55426228c03ea82ac
tree1a7d54a04b7f2cd42c7cb4241e97d557d5123117
parent17f6e81c7cb9e41e1b83edeff2c4cc8aa0c7e7a9
Make more use of int_mode_for_mode

This patch converts more places that could use int_mode_for_mode
instead of mode_for_size.  This is in preparation for an upcoming
patch that makes mode_for_size itself return an opt_mode.

The reason for using required () in exp2_immediate_p is that
we go on to do:

    trunc_int_for_mode (..., int_mode)

which would be invalid for (and have failed for) BLKmode.

The reason for using required () in spu_convert_move and
resolve_simple_move is that we go on to use registers of
the returned mode in non-call rtl instructions, which would
be invalid for BLKmode.

2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
(spu_convert_move): Likewise.
* lower-subreg.c (resolve_simple_move): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251725 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/spu/spu.c
gcc/lower-subreg.c