diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-30 11:12:35 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:12:35 +0000 |
commit | e4dc9904bad9c0ce64b984f5fe895ff66e6f8d9d (patch) | |
tree | 72b84173a5e96965bcb967fd5f57b8cbd8945e9a /gcc/optabs.c | |
parent | 99767219d617a30394777086fa9ca776390d7098 (diff) | |
download | gcc-e4dc9904bad9c0ce64b984f5fe895ff66e6f8d9d.zip gcc-e4dc9904bad9c0ce64b984f5fe895ff66e6f8d9d.tar.gz gcc-e4dc9904bad9c0ce64b984f5fe895ff66e6f8d9d.tar.bz2 |
[30/77] Use scalar_int_mode for doubleword splits
This patch uses is_a <scalar_int_mode> in a couple of places that
were splitting doubleword integer operations into word_mode
operations. It also uses scalar_int_mode in the expand_expr_real_2
handling of doubleword shifts.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* expr.c (expand_expr_real_2): Use scalar_int_mode for the
double-word mode.
* lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
* optabs.c (expand_unop): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251482
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 1dfb545..d9609ff 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2737,22 +2737,24 @@ expand_unop (machine_mode mode, optab unoptab, rtx op0, rtx target, } if (unoptab == popcount_optab - && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD + && is_a <scalar_int_mode> (mode, &int_mode) + && GET_MODE_SIZE (int_mode) == 2 * UNITS_PER_WORD && optab_handler (unoptab, word_mode) != CODE_FOR_nothing && optimize_insn_for_speed_p ()) { - temp = expand_doubleword_popcount (mode, op0, target); + temp = expand_doubleword_popcount (int_mode, op0, target); if (temp) return temp; } if (unoptab == parity_optab - && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD + && is_a <scalar_int_mode> (mode, &int_mode) + && GET_MODE_SIZE (int_mode) == 2 * UNITS_PER_WORD && (optab_handler (unoptab, word_mode) != CODE_FOR_nothing || optab_handler (popcount_optab, word_mode) != CODE_FOR_nothing) && optimize_insn_for_speed_p ()) { - temp = expand_doubleword_parity (mode, op0, target); + temp = expand_doubleword_parity (int_mode, op0, target); if (temp) return temp; } |