Make more use of int_mode_for_mode
authorRichard Sandiford <richard.sandiford@linaro.org>
Tue, 5 Sep 2017 19:56:49 +0000 (19:56 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 5 Sep 2017 19:56:49 +0000 (19:56 +0000)
commit636bfdfaa1b466c5699e8e3c5d46a4f94c9b845c
tree1a7d54a04b7f2cd42c7cb4241e97d557d5123117
parent36560e9e15a83b068d3a9dd12816a2529086e69a
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.

From-SVN: r251725
gcc/ChangeLog
gcc/config/spu/spu.c
gcc/lower-subreg.c