public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-4718] tree-optimization/97709 - set abnormal flag when vectorizing live lanes Date: Wed, 4 Nov 2020 11:41:23 +0000 (GMT) [thread overview] Message-ID: <20201104114123.4FE73384C005@sourceware.org> (raw) https://gcc.gnu.org/g:1e9f339d946b8296e3785bec77e03d71b487d689 commit r11-4718-g1e9f339d946b8296e3785bec77e03d71b487d689 Author: Richard Biener <rguenther@suse.de> Date: Wed Nov 4 11:20:17 2020 +0100 tree-optimization/97709 - set abnormal flag when vectorizing live lanes This properly sets the abnormal flag when vectorizing live lanes when the original scalar was live across an abnormal edge. 2020-11-04 Richard Biener <rguenther@suse.de> PR tree-optimization/97709 * tree-vect-loop.c (vectorizable_live_operation): Set SSA_NAME_OCCURS_IN_ABNORMAL_PHI when necessary. * gcc.dg/vect/bb-slp-pr97709.c: New testcase. Diff: --- gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c | 26 ++++++++++++++++++++++++++ gcc/tree-vect-loop.c | 3 +++ 2 files changed, 29 insertions(+) diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c new file mode 100644 index 00000000000..672807f167c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ + +int a; +struct b { + int c; + int d; +}; +void k (struct b); +struct b +e() +{ + void *f[] = {&&g, &&h, &&i, &&j}; + int d, c; +j: + goto *a; +g: + d = 0; +h: + c = 1; + goto *a; +i: + { + struct b b = {c, d}; + k(b); + } +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index c09aa392419..6cb2286d5c8 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8568,6 +8568,9 @@ vectorizable_live_operation (vec_info *vinfo, gimple_seq stmts = NULL; new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree), &stmts, true, NULL_TREE); + if (TREE_CODE (new_tree) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) + SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_tree) = 1; if (is_a <gphi *> (vec_stmt)) { gimple_stmt_iterator si = gsi_after_labels (gimple_bb (vec_stmt));
reply other threads:[~2020-11-04 11:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201104114123.4FE73384C005@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).