]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/emit-rtl.c
[28/77] Use is_a <scalar_int_mode> for miscellaneous types of test
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:12:14 +0000 (11:12 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:12:14 +0000 (11:12 +0000)
commit58a70f63f359717969a741927ec30ec7b41e348f
tree8a383584e324e07a123acf20a153583961e949e9
parent4a36ac446afeedfe0afeac1c5eca12c98160f5bb
[28/77] Use is_a <scalar_int_mode> for miscellaneous types of test

This patch adds is_a <scalar_int_mode> checks to various places
that were explicitly or implicitly restricted to integers already,
in cases where adding an explicit is_a <scalar_int_mode> is useful
for later patches.

In simplify_if_then_else, the:

  GET_MODE (XEXP (XEXP (t, 0), N))

expressions were equivalent to:

  GET_MODE (XEXP (t, 0))

due to the type of operation.

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

gcc/
* combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
checks.
(try_combine): Likewise.
(simplify_if_then_else): Likewise.
* cse.c (cse_insn): Likewise.
* dwarf2out.c (mem_loc_descriptor): Likewise.
* emit-rtl.c (gen_lowpart_common): Likewise.
* simplify-rtx.c (simplify_truncation): Likewise.
(simplify_binary_operation_1): Likewise.
(simplify_const_relational_operation): Likewise.
(simplify_ternary_operation): Likewise.
* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251480 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c
gcc/cse.c
gcc/dwarf2out.c
gcc/emit-rtl.c
gcc/simplify-rtx.c
gcc/tree-ssa-loop-ivopts.c