diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2019-10-18 19:05:01 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2019-10-18 19:05:01 +0000 |
commit | 238273fe06e3da6dd1d80b04217d53c76cf5fa41 (patch) | |
tree | 177180722b23c5cf0e36552f397dbc843cb3a815 /gcc/tree.c | |
parent | eff5ce0a95699d3eeded9854bff25913cfbdb2f3 (diff) | |
download | gcc-238273fe06e3da6dd1d80b04217d53c76cf5fa41.zip gcc-238273fe06e3da6dd1d80b04217d53c76cf5fa41.tar.gz gcc-238273fe06e3da6dd1d80b04217d53c76cf5fa41.tar.bz2 |
[arm] Improve constant handling for subvsi4.
This patch addresses constant handling in subvsi4. Either operand may
be a constant. If the second input (operand[2]) is a constant, then
we can canonicalize this into an addition form, providing we take care
of the INT_MIN case. In that case the negation has to handle the fact
that -INT_MIN is still INT_MIN and we need to ensure that a subtract
operation is performed rather than an addition. The remaining cases
are largely duals of the usubvsi4 expansion.
This patch also fixes a technical correctness bug in the old
expansion, where we did not realy describe the test for overflow in
the RTL. We seem to have got away with that, however...
* config/arm/arm.md (subv<mode>4): Delete.
(subvdi4): New expander pattern.
(subvsi4): Likewise. Handle some immediate values.
(subvsi3_intmin): New insn pattern.
(subvsi3): Likewise.
(subvsi3_imm1): Likewise.
* config/arm/arm.c (select_cc_mode): Also allow minus for CC_V
idioms.
From-SVN: r277189
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions