Add an is_narrower_int_mode helper function
commit0d97e6d1fd7ca63c5b9aba845c4bb2bb7e508b93
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2017 13:30:34 +0000 (1 13:30 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Nov 2017 13:30:34 +0000 (1 13:30 +0000)
tree0ae2545c05dfb383c6e30bf2152244a320722bec
parent296e7207f0dba5e151dec0adc7f5c623b572c881
Add an is_narrower_int_mode helper function

This patch adds a function for testing whether an arbitrary mode X
is an integer mode that is narrower than integer mode Y.  This is
useful for code like expand_float and expand_fix that could in
principle handle vectors as well as scalars.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* machmode.h (is_narrower_int_mode): New function
* optabs.c (expand_float, expand_fix): Use it.
* dwarf2out.c (rotate_loc_descriptor): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254305 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dwarf2out.c
gcc/machmode.h
gcc/optabs.c