@@ -86,6 +86,7 @@ along with GCC; see the file COPYING3. If not see
#include "ipa-prop.h"
#include "ipa-fnsummary.h"
#include "sched-int.h"
+#include "ifcvt.h"
/* This file should be included last. */
#include "target-def.h"
@@ -393,6 +394,8 @@ struct s390_address
bool literal_pool;
};
+#define MAX_IFCVT_INSNS 2
+
/* Few accessor macros for struct cfun->machine->s390_frame_layout. */
#define cfun_frame_layout (cfun->machine->frame_layout)
@@ -15989,6 +15992,17 @@ s390_case_values_threshold (void)
return default_case_values_threshold ();
}
+static bool
+s390_noce_conversion_profitable_p (rtx_insn *seq, struct noce_if_info *if_info)
+{
+ if (if_info->transform
+ && if_info->transform == ifcvt_transform_noce_convert_multiple_sets
+ && if_info->created_cmovs <= MAX_IFCVT_INSNS)
+ return true;
+
+ return default_noce_conversion_profitable_p (seq, if_info);
+}
+
/* Initialize GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
@@ -16240,6 +16254,9 @@ s390_case_values_threshold (void)
#undef TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT
#define TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT s390_support_vector_misalignment
+#undef TARGET_NOCE_CONVERSION_PROFITABLE_P
+#define TARGET_NOCE_CONVERSION_PROFITABLE_P s390_noce_conversion_profitable_p
+
#undef TARGET_VECTOR_ALIGNMENT
#define TARGET_VECTOR_ALIGNMENT s390_vector_alignment