diff options
author | Alex Coplan <alex.coplan@arm.com> | 2023-12-20 09:39:29 +0000 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2023-12-20 09:40:57 +0000 |
commit | f5213759a7e0efc4ca7bbb484bab94ca19bc1b5d (patch) | |
tree | a81c3650154a59c01b2a9e2b9a84464b4af2a608 /gcc/c | |
parent | bfdadcb2991c8601671944e5a7834194d73d2c14 (diff) | |
download | gcc-f5213759a7e0efc4ca7bbb484bab94ca19bc1b5d.zip gcc-f5213759a7e0efc4ca7bbb484bab94ca19bc1b5d.tar.gz gcc-f5213759a7e0efc4ca7bbb484bab94ca19bc1b5d.tar.bz2 |
aarch64: Validate register operands early in ldp fusion pass [PR113062]
We were missing validation of the candidate register operands in the
ldp/stp pass. I was relying on recog rejecting such cases when we
formed the final pair insn, but the testcase shows that with
-fharden-conditionals we attempt to combine two insns with asm_operands,
both containing mem rtxes. This then trips the assert:
gcc_assert (change->new_uses.is_valid ());
in the stp case as we aren't expecting to have (distinct) uses of mem in
the candidate stores.
While doing this I noticed that it seems more natural to have the
initial definition of mem_size closer to its first use in track_access,
so I moved that down.
gcc/ChangeLog:
PR target/113062
* config/aarch64/aarch64-ldp-fusion.cc
(ldp_bb_info::track_access): Punt on accesses with invalid
register operands, move definition of mem_size closer to its
first use.
gcc/testsuite/ChangeLog:
PR target/113062
* gcc.dg/pr113062.c: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions