diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-30 11:11:50 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:11:50 +0000 |
commit | 095a49c86a8ac69b5dd6d78edf17b9e3803e5bf8 (patch) | |
tree | c7baab125a4bc8be7aa0212769be0246a31d4102 /gcc/cse.c | |
parent | 6b9c3decc38f6f852adf16951b9b1b043112cd1c (diff) | |
download | gcc-095a49c86a8ac69b5dd6d78edf17b9e3803e5bf8.zip gcc-095a49c86a8ac69b5dd6d78edf17b9e3803e5bf8.tar.gz gcc-095a49c86a8ac69b5dd6d78edf17b9e3803e5bf8.tar.bz2 |
[27/77] Use is_a <scalar_int_mode> before LOAD_EXTEND_OP
This patch adds is_a <scalar_int_mode> checks before load_extend_op/
LOAD_EXTEND_OP calls, if that becomes useful for later patches.
(load_extend_op will return UNKNOWN for any other type of mode.)
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
* reload.c (push_reload): Likewise.
(find_reloads): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251479
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -4923,7 +4923,8 @@ cse_insn (rtx_insn *insn) rtx_code extend_op; if (flag_expensive_optimizations && src_related == 0 && MEM_P (src) && ! do_not_record - && (extend_op = load_extend_op (mode)) != UNKNOWN) + && is_a <scalar_int_mode> (mode, &int_mode) + && (extend_op = load_extend_op (int_mode)) != UNKNOWN) { struct rtx_def memory_extend_buf; rtx memory_extend_rtx = &memory_extend_buf; @@ -4935,7 +4936,7 @@ cse_insn (rtx_insn *insn) PUT_CODE (memory_extend_rtx, extend_op); XEXP (memory_extend_rtx, 0) = src; - FOR_EACH_WIDER_MODE (tmode, mode) + FOR_EACH_WIDER_MODE (tmode, int_mode) { struct table_elt *larger_elt; @@ -4952,7 +4953,7 @@ cse_insn (rtx_insn *insn) larger_elt; larger_elt = larger_elt->next_same_value) if (REG_P (larger_elt->exp)) { - src_related = gen_lowpart (mode, larger_elt->exp); + src_related = gen_lowpart (int_mode, larger_elt->exp); break; } |