public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/94043] [9/10 Regression] ICE in superloop_at_depth, at cfgloop.c:78
Date: Sun, 22 Mar 2020 08:39:44 +0000	[thread overview]
Message-ID: <bug-94043-4-aK0Yl0u8xk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94043-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94043

--- Comment #8 from Kewen Lin <linkw at gcc dot gnu.org> ---
> It's most likely either SCEV or expand_simple_operations looking throuhg
> the single-arg PHI (which we should avoid for LC PHI nodes)

Thanks Richi, I found the loop-closed PHI form was broken after we finished the
vectorization on the loop 2, BB 38 was inserted, the function
gimple_find_edge_insert_loc will get one new BB if the dest has phis, even it's
unrelated.

;; basic block 4, loop depth 2
;;  pred:       11
;;              37
...
_15 = e2.2_31 + 1;
...
if (ivtmp_59 >= 1)
  goto <bb 38>; [100.00%]
else
  goto <bb 11>; [0.00%]
;;  succ:       38
;;              11

;; basic block 38, loop depth 1
;;  pred:       4
_40 = BIT_FIELD_REF <vect__15.22_43, 32, 96>;
;;  succ:       33

;; basic block 33, loop depth 1
;;  pred:       38
# _51 = PHI <_15(38)> 
;;  succ:       34

The alternatives seems could be 1) extend the current
gimple_find_edge_insert_loc to handle the phi nodes, if the phis aren't
related, just insert there, otherwise, insert some phis for uses of those stmts
and remove the related phis and create new assignments after those new stmts,
or 2) call rewrite_into_loop_closed_ssa for each successful vectorization.

  parent reply	other threads:[~2020-03-22  8:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-94043-4@http.gcc.gnu.org/bugzilla/>
2020-03-12 11:58 ` jakub at gcc dot gnu.org
2020-03-17 14:36 ` marxin at gcc dot gnu.org
2020-03-18  2:49 ` linkw at gcc dot gnu.org
2020-03-20  2:56 ` linkw at gcc dot gnu.org
2020-03-20  7:06 ` rguenther at suse dot de
2020-03-20  7:14 ` linkw at gcc dot gnu.org
2020-03-20  7:22 ` rguenther at suse dot de
2020-03-22  8:39 ` linkw at gcc dot gnu.org [this message]
2020-03-23 13:21 ` rguenth at gcc dot gnu.org
2020-03-24  2:59 ` linkw at gcc dot gnu.org
2020-03-24  6:44 ` rguenther at suse dot de
2020-03-26  2:45 ` linkw at gcc dot gnu.org
2020-03-26  8:26 ` rguenth at gcc dot gnu.org
2020-03-26  8:54 ` linkw at gcc dot gnu.org
2020-03-26  9:05 ` rguenther at suse dot de
2020-03-26 12:56 ` linkw at gcc dot gnu.org
2020-03-26 13:36 ` rguenth at gcc dot gnu.org
2020-04-01  5:24 ` cvs-commit at gcc dot gnu.org
2020-04-01  6:44 ` linkw at gcc dot gnu.org
2020-04-01  6:56 ` [Bug tree-optimization/94043] [9 " rguenth at gcc dot gnu.org
2020-04-01  7:30 ` linkw at gcc dot gnu.org
2020-04-02 13:21 ` clyon at gcc dot gnu.org
2020-04-17  8:55 ` cvs-commit at gcc dot gnu.org
2020-04-17  9:01 ` linkw at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94043-4-aK0Yl0u8xk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).