tree-ssa.dce.c (eliminate_unnecessary_stmts): Eliminate IFN_GOMP_SIMD_LANE without...
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Nov 2014 19:41:00 +0000 (20:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 14 Nov 2014 19:41:00 +0000 (20:41 +0100)
* tree-ssa.dce.c (eliminate_unnecessary_stmts): Eliminate
IFN_GOMP_SIMD_LANE without lhs as useless.

From-SVN: r217584

gcc/ChangeLog
gcc/tree-ssa-dce.c

index c5ea481145833550affbc4814600803d9c95518d..161b2a03f170da6f1edaf8b562f2da286bc11624 100644 (file)
@@ -1,5 +1,8 @@
 2014-11-14  Jakub Jelinek  <jakub@redhat.com>
 
+       * tree-ssa.dce.c (eliminate_unnecessary_stmts): Eliminate
+       IFN_GOMP_SIMD_LANE without lhs as useless.
+
        * ipa-pure-const.c (struct funct_state_d): Add can_free field.
        (varying_state): Add true for can_free.
        (check_call): For builtin or internal !nonfreeing_call_p set
index 6543dc7d26add40a10e3ab31a73f6d88a0d06e3a..3a230584853d6faa28977981b4980f3828376843 100644 (file)
@@ -1402,6 +1402,11 @@ eliminate_unnecessary_stmts (void)
                  maybe_clean_or_replace_eh_stmt (stmt, stmt);
                  update_stmt (stmt);
                  release_ssa_name (name);
+
+                 /* GOMP_SIMD_LANE without lhs is not needed.  */
+                 if (gimple_call_internal_p (stmt)
+                     && gimple_call_internal_fn (stmt) == IFN_GOMP_SIMD_LANE)
+                   remove_dead_stmt (&gsi, bb);
                }
              else if (gimple_call_internal_p (stmt))
                switch (gimple_call_internal_fn (stmt))