The original patch to fix this PR broke the if-conversion of calls into
IFN_MASK_CALL. This patch restores that original behaviour and makes sure the
tests added earlier specifically test inbranch SIMD clones.
gcc/ChangeLog:
PR tree-optimization/108888
* tree-if-conv.cc (predicate_statements): Fix gimple call check.
gcc/testsuite/ChangeLog:
* gcc.dg/vect/vect-simd-clone-16.c: Make simd clone inbranch only.
* gcc.dg/vect/vect-simd-clone-17.c: Likewise.
* gcc.dg/vect/vect-simd-clone-18.c: Likewise.
(cherry picked from commit
58c8c1b383bc3c286d6527fc6e8fb62463f9a877)
+2023-04-13 Andrew Stubbs <ams@codesourcery.com>
+
+ Backport from mainline:
+ Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ PR tree-optimization/108888
+ * tree-if-conv.cc (predicate_statements): Fix gimple call check.
+
2023-04-03 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn-valu.md (one_cmpl<mode>2<exec>): New.
+2023-04-13 Andrew Stubbs <ams@codesourcery.com>
+
+ Backport from mainline:
+ Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ PR tree-optimization/108888
+ * gcc.dg/vect/vect-simd-clone-16.c: Make simd clone inbranch only.
+ * gcc.dg/vect/vect-simd-clone-17.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-18.c: Likewise.
+
2023-03-27 Frederik Harwath <frederik@codesourcery.com>
* c-c++-common/gomp/loop-transforms/unroll-inner-1.c: New test.
#endif
/* A simple function that will be cloned. */
-#pragma omp declare simd
+#pragma omp declare simd inbranch
TYPE __attribute__((noinline))
foo (TYPE a)
{
#endif
/* A simple function that will be cloned. */
-#pragma omp declare simd uniform(b)
+#pragma omp declare simd inbranch uniform(b)
TYPE __attribute__((noinline))
foo (TYPE a, TYPE b)
{
#endif
/* A simple function that will be cloned. */
-#pragma omp declare simd uniform(b)
+#pragma omp declare simd inbranch uniform(b)
TYPE __attribute__((noinline))
foo (TYPE b, TYPE a)
{
gimple_assign_set_rhs1 (stmt, ifc_temp_var (type, rhs, &gsi));
update_stmt (stmt);
}
- else if (gimple_plf (stmt, GF_PLF_2)
- && is_gimple_call (stmt))
+
+ if (gimple_plf (gsi_stmt (gsi), GF_PLF_2)
+ && is_gimple_call (gsi_stmt (gsi)))
{
/* Convert functions that have a SIMD clone to IFN_MASK_CALL.
This will cause the vectorizer to match the "in branch"