public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/79334] Segfault on tree loop hoisting
[not found] <bug-79334-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-22 20:38 ` pinskia at gcc dot gnu.org
2021-08-23 8:00 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22 20:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79334
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alan Modra from comment #4)
> When you have the tree optimization bug fixed, this becomes an rtl
> optimization bug since rtl pre does the same as tree pre..
GCSE was fixed with PR 78812. So this is just a bug on the gimple level still.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/79334] Segfault on tree loop hoisting
[not found] <bug-79334-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 20:38 ` [Bug tree-optimization/79334] Segfault on tree loop hoisting pinskia at gcc dot gnu.org
@ 2021-08-23 8:00 ` rguenth at gcc dot gnu.org
2021-08-23 9:53 ` cvs-commit at gcc dot gnu.org
2021-08-23 9:54 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-23 8:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79334
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So this should now be correctly checked after
g:fedcf3c476aff7533741a1c61071200f0a38cf83 which fixes prune_clobbered_mems.
That uses vn_reference_may_trap which only does
case ARRAY_RANGE_REF:
case ARRAY_REF:
if (TREE_CODE (op->op0) == SSA_NAME)
return true;
so doesn't return true for out-of-bound reads. tree_could_trap_p uses
[range_]in_array_bounds_p which we'd need to replicate here.
I'm testing a patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/79334] Segfault on tree loop hoisting
[not found] <bug-79334-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 20:38 ` [Bug tree-optimization/79334] Segfault on tree loop hoisting pinskia at gcc dot gnu.org
2021-08-23 8:00 ` rguenth at gcc dot gnu.org
@ 2021-08-23 9:53 ` cvs-commit at gcc dot gnu.org
2021-08-23 9:54 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-23 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79334
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:ad665deeafd31238b537139385e1e80b40c10e0c
commit r12-3071-gad665deeafd31238b537139385e1e80b40c10e0c
Author: Richard Biener <rguenther@suse.de>
Date: Mon Aug 23 09:57:05 2021 +0200
tree-optimization/79334 - avoid PRE of possibly trapping array-ref
This replicates tree-eh.c in_array_bound_p into VNs
vn_reference_may_trap to fix hoisting of a possibly trapping
ARRAY_REF across a call that might not return.
2021-08-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79334
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record
a type also for COMPONENT_REFs.
(vn_reference_may_trap): Check ARRAY_REF with constant index
against the array domain.
* gcc.dg/torture/pr79334-0.c: New testcase.
* gcc.dg/torture/pr79334-1.c: Likewise.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/79334] Segfault on tree loop hoisting
[not found] <bug-79334-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-08-23 9:53 ` cvs-commit at gcc dot gnu.org
@ 2021-08-23 9:54 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-23 9:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79334
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Status|ASSIGNED |RESOLVED
Known to work| |12.0
Resolution|--- |FIXED
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 12.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-23 9:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-79334-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 20:38 ` [Bug tree-optimization/79334] Segfault on tree loop hoisting pinskia at gcc dot gnu.org
2021-08-23 8:00 ` rguenth at gcc dot gnu.org
2021-08-23 9:53 ` cvs-commit at gcc dot gnu.org
2021-08-23 9:54 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).