From 1cfcd39eee915a7582adc113fa6e7faac8b943e4 Mon Sep 17 00:00:00 2001
From: Bin Cheng <bin.cheng@arm.com>
Date: Tue, 3 May 2016 09:04:46 +0000
Subject: re PR tree-optimization/56541 (vectorizaton fails in conditional
 assignment of a constant)

	PR tree-optimization/56541
	* doc/invoke.texi (@item max-tree-if-conversion-phi-args): New item.
	* params.def (PARAM_MAX_TREE_IF_CONVERSION_PHI_ARGS): new param.
	* tree-if-conv.c (MAX_PHI_ARG_NUM): new macro.
	(any_complicated_phi): new static variable.
	(aggressive_if_conv): delete.
	(if_convertible_phi_p): support phis with more than two arguments.
	(if_convertible_bb_p): remvoe check on aggressive_if_conv and
	critical pred edges.
	(ifcvt_split_critical_edges): support phis with more than two
	arguments by checking new parameter.  only split critical edges
	if needed.
	(tree_if_conversion): handle simd pragma marked loop using new
	local variable aggressive_if_conv.  check any_complicated_phi.

	gcc/testsuite
	PR tree-optimization/56541
	* gcc.dg/tree-ssa/ifc-pr56541.c: new test.
	* gcc.dg/vect/pr56541.c: new test.

From-SVN: r235808
---
 gcc/params.def | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'gcc/params.def')

diff --git a/gcc/params.def b/gcc/params.def
index 9e05401..62a1e404 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -530,6 +530,12 @@ DEFPARAM(PARAM_SCEV_MAX_EXPR_COMPLEXITY,
 	 "Bound on the complexity of the expressions in the scalar evolutions analyzer.",
 	 10, 0, 0)
 
+DEFPARAM (PARAM_MAX_TREE_IF_CONVERSION_PHI_ARGS,
+	  "max-tree-if-conversion-phi-args",
+	  "Maximum number of arguments in a PHI supported by TREE if-conversion "
+	  "unless the loop is marked with simd pragma.",
+	  4, 2, 0)
+
 DEFPARAM(PARAM_VECT_MAX_VERSION_FOR_ALIGNMENT_CHECKS,
          "vect-max-version-for-alignment-checks",
          "Bound on number of runtime checks inserted by the vectorizer's loop versioning for alignment check.",
-- 
cgit v1.1

