diff options
author | Bin Cheng <bin.cheng@arm.com> | 2017-08-16 15:02:03 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2017-08-16 15:02:03 +0000 |
commit | 90d43c80aabfbea574ee0435b746f423a62bf3a6 (patch) | |
tree | bca75064b6f4059c725bbc2111fd8d3488ec00d1 /gcc/tree-ssa-loop-ch.c | |
parent | 5dd2d9850bfe2159c1f71b25c5451eab2c603ec2 (diff) | |
download | gcc-90d43c80aabfbea574ee0435b746f423a62bf3a6.zip gcc-90d43c80aabfbea574ee0435b746f423a62bf3a6.tar.gz gcc-90d43c80aabfbea574ee0435b746f423a62bf3a6.tar.bz2 |
re PR middle-end/81832 (ICE in expand_LOOP_DIST_ALIAS, at internal-fn.c:2273)
PR tree-optimization/81832
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
copy loop header which has IFN_LOOP_DIST_ALIAS call.
gcc/testsuite
* gcc.dg/tree-ssa/pr81832.c: New test.
From-SVN: r251123
Diffstat (limited to 'gcc/tree-ssa-loop-ch.c')
-rw-r--r-- | gcc/tree-ssa-loop-ch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c index 14cc6d8d..6bb0220 100644 --- a/gcc/tree-ssa-loop-ch.c +++ b/gcc/tree-ssa-loop-ch.c @@ -119,7 +119,10 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop, continue; if (gimple_code (last) == GIMPLE_CALL - && !gimple_inexpensive_call_p (as_a <gcall *> (last))) + && (!gimple_inexpensive_call_p (as_a <gcall *> (last)) + /* IFN_LOOP_DIST_ALIAS means that inner loop is distributed + at current loop's header. Don't copy in this case. */ + || gimple_call_internal_p (last, IFN_LOOP_DIST_ALIAS))) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, |