diff options
author | Richard Biener <rguenther@suse.de> | 2019-05-27 13:18:12 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-05-27 13:18:12 +0000 |
commit | d6b3654a9ace038ddce90f4c671d5edb4b3479e2 (patch) | |
tree | ff722ceb0a8686663c2c53e072b347aa228abcbb /gcc/tree-ssa-sink.c | |
parent | 8da3776f936b487f5bdf94f372890c3f13604021 (diff) | |
download | gcc-d6b3654a9ace038ddce90f4c671d5edb4b3479e2.zip gcc-d6b3654a9ace038ddce90f4c671d5edb4b3479e2.tar.gz gcc-d6b3654a9ace038ddce90f4c671d5edb4b3479e2.tar.bz2 |
re PR tree-optimization/90637 (ICE in vect_loop_versioning, at tree-vect-loop-manip.c:3055)
2019-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/90637
* tree-ssa-sink.c (statement_sink_location): Honor the
computed sink location for single-uses.
* gcc.dg/gomp/pr90637.c: New testcase.
From-SVN: r271661
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r-- | gcc/tree-ssa-sink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 77abe3a..67dc127 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -439,7 +439,10 @@ statement_sink_location (gimple *stmt, basic_block frombb, if (sinkbb == frombb) return false; - *togsi = gsi_for_stmt (use); + if (sinkbb == gimple_bb (use)) + *togsi = gsi_for_stmt (use); + else + *togsi = gsi_after_labels (sinkbb); return true; } |