+2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * doc/sourcebuild.texi: Document vect_peeling_profitable.
+
2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* doc/sourcebuild.texi: Document vect_intdouble_cvt and
@item vect_no_align
Target does not support a vector alignment mechanism.
+@item vect_peeling_profitable
+Target might require to peel loops for alignment purposes.
+
@item vect_no_int_min_max
Target does not support a vector min and max instruction on @code{int}.
+2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * g++.dg/vect/slp-pr56812.cc: xfail for targets which don't want
+ vector loop peeling.
+ * lib/target-supports.exp (check_effective_target_vect_peeling_profitable):
+ New proc.
+
2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.dg/vect/pr66251.c: Replace vect_floatint_cvt with
data[i] = x;\r
}\r
\r
-/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" } } */\r
+/* For targets without vector loop peeling the loop becomes cheap\r
+ enough to be vectorized. */\r
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" { xfail { ! vect_peeling_profitable } } } } */\r
return $et_vect_floatuint_cvt_saved($et_index)
}
+# Return 1 if peeling for alignment might be profitable on the target
+#
+
+proc check_effective_target_vect_peeling_profitable { } {
+ global et_vect_peeling_profitable_saved
+ global et_index
+
+ if [info exists et_vect_peeling_profitable_saved($et_index)] {
+ verbose "check_effective_target_vect_peeling_profitable: using cached result" 2
+ } else {
+ set et_vect_peeling_profitable_saved($et_index) 1
+ if { ([istarget s390*-*-*]
+ && [check_effective_target_s390_vx]) } {
+ set et_vect_peeling_profitable_saved($et_index) 0
+ }
+ }
+
+ verbose "check_effective_target_vect_peeling_profitable:\
+ returning $et_vect_peeling_profitable_saved($et_index)" 2
+ return $et_vect_peeling_profitable_saved($et_index)
+}
+
# Return 1 if the target supports #pragma omp declare simd, 0 otherwise.
#
# This won't change for different subtargets so cache the result.