===================================================================
@@ -1486,6 +1486,9 @@ Target prefers vectors to have an alignm
alignment, but also allows unaligned vector accesses in some
circumstances.
+@item vect_variable_length
+Target has variable-length vectors.
+
@item vect_widen_sum_hi_to_si
Target supports a vector widening summation of @code{short} operands
into @code{int} results, or can promote (unpack) from @code{short}
===================================================================
@@ -6714,6 +6714,12 @@ proc check_effective_target_vect_multipl
return [expr { [llength [available_vector_sizes]] > 1 }]
}
+# Return true if variable-length vectors are supported.
+
+proc check_effective_target_vect_variable_length { } {
+ return [expr { [lindex [available_vector_sizes] 0] == 0 }]
+}
+
# Return 1 if the target supports vectors of 64 bits.
proc check_effective_target_vect64 { } {
===================================================================
@@ -16,4 +16,6 @@ foo (double *x, int n)
return p;
}
-/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" } } */
+/* Until fully-masked loops are supported, we always need an epilog
+ loop for variable-length vectors. */
+/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" { xfail vect_variable_length } } } */
===================================================================
@@ -44,5 +44,5 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_int_add || { ! { vect_unpack || vect_strided2 } } } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } } } } */
+/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } xfail vect_variable_length } } } */
===================================================================
@@ -15,5 +15,5 @@ f1 (struct s *a, struct s *b)
}
/* { dg-final { scan-tree-dump-times "consider run-time aliasing" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" { xfail vect_variable_length } } } */
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */
===================================================================
@@ -42,5 +42,5 @@ C
! vectorized loop. If vector factor is 2, the vectorized loop can
! be predictive commoned, we check if predictive commoning PHI node
! is created with vector(2) type.
-! { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" } }
-! { dg-final { scan-tree-dump "vectp_u.*__lsm.* = PHI <.*vectp_u.*__lsm" "pcom" } }
+! { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" { xfail vect_variable_length } } }
+! { dg-final { scan-tree-dump "vectp_u.*__lsm.* = PHI <.*vectp_u.*__lsm" "pcom" { xfail vect_variable_length } } }