diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-01 13:30:34 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-11-01 13:30:34 +0000 |
commit | 7aaba298fe122dfd40bb612623df89db08499f8b (patch) | |
tree | 0ae2545c05dfb383c6e30bf2152244a320722bec /gcc/dwarf2out.c | |
parent | b3ad445f853ab7ca0da6216ff1bebfd6f90425f5 (diff) | |
download | gcc-7aaba298fe122dfd40bb612623df89db08499f8b.zip gcc-7aaba298fe122dfd40bb612623df89db08499f8b.tar.gz gcc-7aaba298fe122dfd40bb612623df89db08499f8b.tar.bz2 |
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.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r254305
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 1a15c96..7344767 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -14547,8 +14547,7 @@ rotate_loc_descriptor (rtx rtl, scalar_int_mode mode, dw_loc_descr_ref op0, op1, ret, mask[2] = { NULL, NULL }; int i; - if (GET_MODE (rtlop1) != VOIDmode - && GET_MODE_BITSIZE (GET_MODE (rtlop1)) < GET_MODE_BITSIZE (mode)) + if (is_narrower_int_mode (GET_MODE (rtlop1), mode)) rtlop1 = gen_rtx_ZERO_EXTEND (mode, rtlop1); op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, VAR_INIT_STATUS_INITIALIZED); |