public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Make sure to simplify CFG after OMP SIMD vectorization
Date: Fri, 26 May 2017 07:17:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.20.1705260912580.20726@zhemvz.fhfr.qr> (raw)


I noticed we keep the VF != 0 check in the CFG for quite some passes
when looking at PR80844 so the following fixes that.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2017-05-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80844
	* tree-vectorizer.c (adjust_simduid_builtins): Propagate
	results.

Index: gcc/tree-vectorizer.c
===================================================================
--- gcc/tree-vectorizer.c	(revision 248409)
+++ gcc/tree-vectorizer.c	(working copy)
@@ -229,8 +229,11 @@ adjust_simduid_builtins (hash_table<simd
 	    default:
 	      gcc_unreachable ();
 	    }
-	  update_call_from_tree (&i, t);
-	  gsi_next (&i);
+	  tree lhs = gimple_call_lhs (stmt);
+	  if (lhs)
+	    replace_uses_by (lhs, t);
+	  release_defs (stmt);
+	  gsi_remove (&i, true);
 	}
     }
 }

                 reply	other threads:[~2017-05-26  7:14 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=alpine.LSU.2.20.1705260912580.20726@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@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).