From 58c8c1b383bc3c286d6527fc6e8fb62463f9a877 Mon Sep 17 00:00:00 2001 From: Andre Vieira Date: Tue, 11 Apr 2023 10:07:43 +0100 Subject: if-conv: Restore MASK_CALL conversion [PR108888] 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. --- gcc/tree-if-conv.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/tree-if-conv.cc') diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc index 3494dcc..7b21b16 100644 --- a/gcc/tree-if-conv.cc +++ b/gcc/tree-if-conv.cc @@ -2641,8 +2641,9 @@ predicate_statements (loop_p loop) 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" -- cgit v1.1