aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-11-03 10:45:18 +0100
committerRichard Biener <rguenther@suse.de>2023-11-03 11:35:03 +0100
commit2266f7cbc78dfcf7c0739466644e0a6b9966553c (patch)
treea0794f051d306cb29cad39cac5fc3d569f4bfb57 /gcc/tree-vect-loop.cc
parent8c8ad4e3533b8590ce063386b8b32f6fce1c3942 (diff)
downloadgcc-2266f7cbc78dfcf7c0739466644e0a6b9966553c.zip
gcc-2266f7cbc78dfcf7c0739466644e0a6b9966553c.tar.gz
gcc-2266f7cbc78dfcf7c0739466644e0a6b9966553c.tar.bz2
tree-optimization/112310 - code hoisting undefined behavior
The following avoids hoisting expressions that may invoke undefined behavior and are not computed on all paths. This is realized by noting that we have to avoid materializing expressions as part of hoisting that are not part of the set of expressions we have found eligible for hoisting. Instead of picking the expression corresponding to the hoistable values from the first successor we now keep a union of the expressions so that hoisting can pick the expression that has its dependences fully hoistable. PR tree-optimization/112310 * tree-ssa-pre.cc (do_hoist_insertion): Keep the union of expressions, validate dependences are contained within the hoistable set before hoisting. * gcc.dg/torture/pr112310.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions