public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* ptx preliminary address space fixes [4/4]
@ 2014-09-11 10:13 Bernd Schmidt
  2014-09-11 11:41 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Bernd Schmidt @ 2014-09-11 10:13 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

This one isn't a wrong-code issue, just a missed optimization.  The 
strlen optimizations need to be made to look through 
ADDR_SPACE_CONVERT_EXPR to work on ptx.

Bootstrapped and tested together with the other patches on x86_64-linux. 
  Ok?


Bernd

[-- Attachment #2: ptx-as4.diff --]
[-- Type: text/x-patch, Size: 744 bytes --]

commit 35d765aeba4ea7d0ba829b2b502c8c7af0c24728
Author: Bernd Schmidt <bernds@codesourcery.com>
Date:   Wed Sep 10 16:34:04 2014 +0200

    	* tree-ssa-strlen.c (strlen_optimize_stmt): Look through
    	ADDR_SPACE_CONVERT_EXPR.

diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c
index bb42cc7..f72ecf5 100644
--- a/gcc/tree-ssa-strlen.c
+++ b/gcc/tree-ssa-strlen.c
@@ -1930,6 +1930,7 @@ strlen_optimize_stmt (gimple_stmt_iterator *gsi)
       if (TREE_CODE (lhs) == SSA_NAME && POINTER_TYPE_P (TREE_TYPE (lhs)))
 	{
 	  if (gimple_assign_single_p (stmt)
+	      || gimple_assign_rhs_code (stmt) == ADDR_SPACE_CONVERT_EXPR
 	      || (gimple_assign_cast_p (stmt)
 		  && POINTER_TYPE_P (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
 	    {

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-22  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 10:13 ptx preliminary address space fixes [4/4] Bernd Schmidt
2014-09-11 11:41 ` Richard Biener
2014-09-17 20:16   ` Bernd Schmidt
2014-09-22  8:49     ` Richard Biener

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).