diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-04-20 15:43:32 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-04-20 15:43:32 +0100 |
commit | 5da301cbd81c41b2e9629f55dd1b1889f7dae75e (patch) | |
tree | 97886636d67a0a5b255626a767bb22c2c06a900e /gcc/fortran/dump-parse-tree.c | |
parent | 697b94cfaef4a958132faf0cf4b35b15dfb29acc (diff) | |
download | gcc-5da301cbd81c41b2e9629f55dd1b1889f7dae75e.zip gcc-5da301cbd81c41b2e9629f55dd1b1889f7dae75e.tar.gz gcc-5da301cbd81c41b2e9629f55dd1b1889f7dae75e.tar.bz2 |
aarch64: Fix vector builds used by SVE vec_init [PR94668]
This testcase triggered an ICE in rtx_vector_builder::step because
we were trying to use a stepped representation for floating-point
constants. The underlying problem was that the arguments to
rtx_vector_builder were the wrong way around, meaning that some
variations were likely to be incorrectly encoded for integers
(but probably as a silent failure).
Also, aarch64_sve_expand_vector_init_handle_trailing_constants
tries to extend the trailing constant elements to a full vector
by following the "natural" pattern of the original vector, which
should generally lead to nicer constants. However, for the testcase,
we'd then end up picking a variable for some elements. Fixed by
stubbing out all variable elements with zeros.
That fix involved testing valid_for_const_vector_p. For consistency,
the patch uses the same test when finding trailing constants, instead
of the previous aarch64_legitimate_constant_p.
2020-04-20 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR target/94668
* config/aarch64/aarch64.c (aarch64_sve_expand_vector_init): Fix
order of arguments to rtx_vector_builder.
(aarch64_sve_expand_vector_init_handle_trailing_constants): Likewise.
When extending the trailing constants to a full vector, replace any
variables with zeros.
gcc/testsuite/
PR target/94668
* gcc.target/aarch64/sve/pr94668.c: New test.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
0 files changed, 0 insertions, 0 deletions