diff options
author | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:11:16 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:11:16 +0000 |
commit | 673bf5a6b65e51d177d2cf9fc4002171b1f467ab (patch) | |
tree | 6c897f8eed13c0d78998341ce2a350c204fa4667 /gcc/dwarf2out.c | |
parent | 45e8e706e295e7770d02c6d9c9798f4bab7ab524 (diff) | |
download | gcc-673bf5a6b65e51d177d2cf9fc4002171b1f467ab.zip gcc-673bf5a6b65e51d177d2cf9fc4002171b1f467ab.tar.gz gcc-673bf5a6b65e51d177d2cf9fc4002171b1f467ab.tar.bz2 |
[23/77] Replace != VOIDmode checks with is_a <scalar_int_mode>
This patch replaces some checks against VOIDmode with checks
of is_a <scalar_int_mode>, in cases where scalar integer modes
were the only useful alternatives left.
gcc/
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
instead of != VOIDmode.
* combine.c (if_then_else_cond): Likewise.
(change_zero_ext): Likewise.
* dwarf2out.c (mem_loc_descriptor): Likewise.
(loc_descriptor): Likewise.
* rtlanal.c (canonicalize_condition): Likewise.
* simplify-rtx.c (simplify_relational_operation_1): Likewise.
From-SVN: r251475
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b24250a..7dd9f26 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -14689,7 +14689,7 @@ mem_loc_descriptor (rtx rtl, machine_mode mode, if (mode != GET_MODE (rtl) && GET_MODE (rtl) != VOIDmode) return NULL; - scalar_int_mode int_mode, inner_mode; + scalar_int_mode int_mode, inner_mode, op1_mode; switch (GET_CODE (rtl)) { case POST_INC: @@ -15127,9 +15127,8 @@ mem_loc_descriptor (rtx rtl, machine_mode mode, VAR_INIT_STATUS_INITIALIZED); { rtx rtlop1 = XEXP (rtl, 1); - if (GET_MODE (rtlop1) != VOIDmode - && GET_MODE_BITSIZE (GET_MODE (rtlop1)) - < GET_MODE_BITSIZE (int_mode)) + if (is_a <scalar_int_mode> (GET_MODE (rtlop1), &op1_mode) + && GET_MODE_BITSIZE (op1_mode) < GET_MODE_BITSIZE (int_mode)) rtlop1 = gen_rtx_ZERO_EXTEND (int_mode, rtlop1); op1 = mem_loc_descriptor (rtlop1, int_mode, mem_mode, VAR_INIT_STATUS_INITIALIZED); @@ -15960,7 +15959,8 @@ loc_descriptor (rtx rtl, machine_mode mode, break; /* FALLTHROUGH */ case LABEL_REF: - if (mode != VOIDmode && GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE + if (is_a <scalar_int_mode> (mode, &int_mode) + && GET_MODE_SIZE (int_mode) == DWARF2_ADDR_SIZE && (dwarf_version >= 4 || !dwarf_strict)) { loc_result = new_addr_loc_descr (rtl, dtprel_false); |