]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/116585 - SSA corruption with split_constant_offset
authorRichard Biener <rguenther@suse.de>
Wed, 18 Sep 2024 07:52:55 +0000 (09:52 +0200)
committerQing Zhao <qing.zhao@oracle.com>
Wed, 2 Oct 2024 13:23:51 +0000 (13:23 +0000)
commit8e5bd9b4b38f5b4fbd2a95d8f61168d9eeea97d3
tree801bd6c808ec645a78389c85e55c3bc1b54a3bef
parent4137d48918c26548e8834f5526a31a255da78032
tree-optimization/116585 - SSA corruption with split_constant_offset

split_constant_offset when looking through SSA defs can end up
picking SSA leafs that are subject to abnormal coalescing.  This
can lead to downstream consumers to insert code based on the
result (like from dataref analysis) in places that violate constraints
for abnormal coalescing.  It's best to not expand defs whose operands
are subject to abnormal coalescing - and not either do something when
a subexpression has operands like that already.

PR tree-optimization/116585
* tree-data-ref.cc (split_constant_offset_1): When either
operand is subject to abnormal coalescing do no further
processing.

* gcc.dg/torture/pr116585.c: New testcase.

(cherry picked from commit 1d0cb3b5fca69b81e69cfdb4aea0eebc1ac04750)
gcc/testsuite/gcc.dg/torture/pr116585.c [new file with mode: 0644]
gcc/tree-data-ref.cc