aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-03-02 10:30:21 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-03-02 10:30:21 +0000
commitb09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a (patch)
treed54c037431eb57c378a7e84a16a197956da69762 /gcc/config.gcc
parent2a8ce4b52f5892a10a02b94d7be689e59a444ff6 (diff)
downloadgcc-b09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a.zip
gcc-b09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a.tar.gz
gcc-b09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a.tar.bz2
Avoid creating (const (reg ...)) [PR108603]
convert_memory_address_addr_space_1 has two modes: one in which it tries to create a self-contained RTL expression (which might fail) and one in which it can emit new instructions where necessary. When handling a CONST, the function recurses into the CONST's operand and then constifies the result. But that's only valid if the result is still a self-contained expression. If new instructions have been emitted, the expression will refer to the (non-constant) results of those instructions. In the PR, this caused us to emit a nonsensical (const (reg ...)) REG_EQUAL note. gcc/ PR tree-optimization/108603 * explow.cc (convert_memory_address_addr_space_1): Only wrap the result of a recursive call in a CONST if no instructions were emitted. gcc/testsuite/ PR tree-optimization/108603 * gcc.target/aarch64/sve/pr108603.c: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions