Remove unnecessary temporary in tree-if-conv.c
authorRichard Sandiford <richard.sandiford@linaro.org>
Sat, 13 Jan 2018 18:01:14 +0000 (18:01 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 13 Jan 2018 18:01:14 +0000 (18:01 +0000)
The call to ifc_temp_var in predicate_mem_writes become redundant
in r230099.  Before that point the mask was calculated using
fold_build_*s, but now it's calculated by gimple_build and so
is already a valid gimple value.

As it stands, the call forces an SSA_NAME-to-SSA_NAME copy
to be created, whereas SLP expects that such redundant copies
have already been eliminated.

2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-if-conv.c (predicate_mem_writes): Remove redundant
call to ifc_temp_var.

From-SVN: r256638

gcc/ChangeLog
gcc/tree-if-conv.c

index d855951..2edd769 100644 (file)
@@ -1,4 +1,9 @@
 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       * tree-if-conv.c (predicate_mem_writes): Remove redundant
+       call to ifc_temp_var.
+
+2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
            Alan Hayward  <alan.hayward@arm.com>
            David Sherwood  <david.sherwood@arm.com>
 
index 4f84953..cac3fd7 100644 (file)
@@ -2261,7 +2261,6 @@ predicate_mem_writes (loop_p loop)
                    }
                  gsi_insert_seq_before (&gsi, stmts, GSI_SAME_STMT);
 
-                 mask = ifc_temp_var (TREE_TYPE (mask), mask, &gsi);
                  /* Save mask and its size for further use.  */
                  vect_sizes.safe_push (bitsize);
                  vect_masks.safe_push (mask);