* tree-tailcall.c (find_tail_calls): Ignore GIMPLE_NOPs.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Dec 2015 16:40:05 +0000 (16:40 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Dec 2015 16:40:05 +0000 (16:40 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231282 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-tailcall.c

index b6ff6e1..d9a0bf8 100644 (file)
@@ -1,5 +1,7 @@
 2015-12-04  Jakub Jelinek  <jakub@redhat.com>
 
+       * tree-tailcall.c (find_tail_calls): Ignore GIMPLE_NOPs.
+
        PR tree-optimization/68680
        * calls.c (special_function_p): Return ECF_MAY_BE_ALLOCA for
        BUILT_IN_ALLOCA{,_WITH_ALIGN}.  Don't check for __builtin_alloca
index bbd1b29..a2585fb 100644 (file)
@@ -412,9 +412,10 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
     {
       stmt = gsi_stmt (gsi);
 
-      /* Ignore labels, returns, clobbers and debug stmts.  */
+      /* Ignore labels, returns, nops, clobbers and debug stmts.  */
       if (gimple_code (stmt) == GIMPLE_LABEL
          || gimple_code (stmt) == GIMPLE_RETURN
+         || gimple_code (stmt) == GIMPLE_NOP
          || gimple_clobber_p (stmt)
          || is_gimple_debug (stmt))
        continue;
@@ -532,7 +533,8 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
 
       stmt = gsi_stmt (agsi);
 
-      if (gimple_code (stmt) == GIMPLE_LABEL)
+      if (gimple_code (stmt) == GIMPLE_LABEL
+         || gimple_code (stmt) == GIMPLE_NOP)
        continue;
 
       if (gimple_code (stmt) == GIMPLE_RETURN)