@@ -25,5 +25,6 @@ foobar(16)
foobar(32)
foobar(64)
+/* Xfail riscv PR112531. */
/* Verify we don't have any vector temporaries in the IL. */
-/* { dg-final { scan-tree-dump-not "vector" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "vector" "optimized" { xfail { riscv_v && vect_variable_length } } } } */
@@ -24,4 +24,4 @@ unsigned test()
return sum;
}
-/* { dg-final { scan-tree-dump "return 15;" "optimized" { xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump "return 15;" "optimized" { xfail { vect_variable_length && aarch64*-*-* } } } } */
@@ -47,8 +47,8 @@ typedef __SIZE_TYPE__ size_t;
/* The following tests fail because of missing range information. The xfail
exclusions are PR79356. */
-TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for signed char" { xfail { ! { aarch64*-*-* arm*-*-* avr-*-* alpha*-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390*-*-* visium-*-* msp430-*-* nvptx*-*-*} } } } */
-TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* avr-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390x-*-* visium-*-* msp430-*-* nvptx*-*-* } } } } */
+TEST (signed char, SCHAR_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for signed char" { xfail { ! { aarch64*-*-* arm*-*-* avr-*-* alpha*-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390*-*-* visium-*-* msp430-*-* nvptx*-*-* riscv*-*-* } } } } */
+TEST (short, SHRT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" "missing range info for short" { xfail { ! { aarch64*-*-* arm*-*-* alpha*-*-* avr-*-* cris-*-* ia64-*-* mips*-*-* or1k*-*-* pdp11*-*-* powerpc*-*-* sparc*-*-* s390x-*-* visium-*-* msp430-*-* nvptx*-*-* riscv*-*-* } } } } */
TEST (int, INT_MIN + 2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */
TEST (int, -3, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */
TEST (int, -2, ALLOC_MAX); /* { dg-warning "argument 1 range \\\[13, \[0-9\]+\\\] exceeds maximum object size 12" } */
@@ -22,6 +22,7 @@ void fun2(int32_t *x, int n)
}
/* Xfail amdgcn where vector truth type is not integer type. */
-/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_shift xfail amdgcn-*-* } } } */
+/* Xfail riscv PR111311. */
+/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_shift xfail { amdgcn-*-* || { riscv_v && vect_variable_length } } } } } */
/* { dg-final { scan-tree-dump {\s+>\s+0} optimized { target { ! vect_shift } } } } */
-/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized { xfail amdgcn-*-* } } } */
+/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized { xfail { amdgcn-*-* || { riscv_v && vect_variable_length } } } } } */
@@ -4,6 +4,7 @@
/* This test does not work when the truth type does not match vector type. */
/* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
+/* { dg-additional-options "-fwrapv" { target riscv_v } } */
/* { dg-xfail-run-if "truth type does not match vector type" { amdgcn-*-* } } */
@@ -13,5 +13,6 @@ int main() {
foo();
}
-/* { dg-final { scan-tree-dump "optimized: loop with \[0-9\]\+ iterations completely unrolled" "cunroll" } } */
-/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
+/* Xfail riscv PR111311. */
+/* { dg-final { scan-tree-dump "optimized: loop with \[0-9\]\+ iterations completely unrolled" "cunroll" { xfail { riscv_v && vect_variable_length } } } } */
+/* { dg-final { scan-tree-dump-not "foo" "optimized" { xfail { riscv_v && vect_variable_length } } } } */
@@ -13,4 +13,5 @@ float summul(int n, float *arg1, float *arg2)
return res1;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_masked_load } } } */
+/* Xfail riscv PR111311. */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_masked_load xfail { riscv_v && vect_variable_length } } } } */
@@ -17,6 +17,7 @@ foo (unsigned char s, unsigned char l)
return sum;
}
+/* Xfail riscv PR111311. */
/* Check loop niter bound information. */
-/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" } } */
+/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" { xfail { riscv_v && vect_variable_length } } } } */
/* { dg-final { scan-tree-dump-not "bounded by 255" "ivopts" } } */
@@ -17,7 +17,8 @@ foo (signed char s, signed char l)
return sum;
}
+/* Xfail riscv PR111311. */
/* Check loop niter bound information. */
-/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" } } */
+/* { dg-final { scan-tree-dump "bounded by 254" "ivopts" {xfail { riscv_v && vect_variable_length } } } } */
/* { dg-final { scan-tree-dump-not "bounded by 255" "ivopts" } } */
/* { dg-final { scan-tree-dump-not "zero if " "ivopts" } } */
@@ -13,4 +13,4 @@ int foo()
}
/* Listed targets xfailed due to PR84958. */
-/* { dg-final { scan-tree-dump "return 285;" "optimized" { xfail { amdgcn*-*-* || vect_variable_length } } } } */
+/* { dg-final { scan-tree-dump "return 285;" "optimized" { xfail { amdgcn*-*-* || { aarch64*-*-* && vect_variable_length } } } } } */
@@ -24,6 +24,7 @@ int main(void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Combination" 1 "pcom"} } */
-/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom"} } */
+/* Xfail riscv PR112531. */
+/* { dg-final { scan-tree-dump-times "Combination" 1 "pcom" { xfail { riscv_v && vect_variable_length } } } } */
+/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom" { xfail { riscv_v && vect_variable_length } } } } */
/* { dg-final { scan-tree-dump-not "Invalid sum" "pcom" } } */
@@ -24,6 +24,7 @@ int main(void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Combination" 2 "pcom"} } */
-/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom"} } */
+/* Xfail riscv PR112531. */
+/* { dg-final { scan-tree-dump-times "Combination" 2 "pcom" { xfail { riscv_v && vect_variable_length } } } } */
+/* { dg-final { scan-tree-dump-times "Unrolling 3 times." 1 "pcom" { xfail { riscv_v && vect_variable_length } } } } */
/* { dg-final { scan-tree-dump-not "Invalid sum" "pcom" } } */
@@ -16,5 +16,6 @@ void foo (void)
}
}
+/* Xfail riscv PR112531. */
/* { dg-final { scan-tree-dump-not "Sinking # VUSE" "sink1" } } */
-/* { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" } } */
+/* { dg-final { scan-tree-dump "Executing predictive commoning without unrolling" "pcom" { xfail { riscv_v && vect_variable_length } } } } */
@@ -3,5 +3,6 @@
#include "reassoc-46.h"
+/* Xfail riscv PR112531. */
/* Check that the loop accumulator is added last. */
-/* { dg-final { scan-tree-dump-times {(?:vect_)?sum_[\d._]+ = (?:(?:vect_)?_[\d._]+ \+ (?:vect_)?sum_[\d._]+|(?:vect_)?sum_[\d._]+ \+ (?:vect_)?_[\d._]+)} 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times {(?:vect_)?sum_[\d._]+ = (?:(?:vect_)?_[\d._]+ \+ (?:vect_)?sum_[\d._]+|(?:vect_)?sum_[\d._]+ \+ (?:vect_)?_[\d._]+)} 1 "optimized" { xfail { riscv_v && vect_variable_length } } } } */
@@ -17,6 +17,7 @@ foo (signed char s, signed char l)
return sum;
}
+/* Xfail riscv PR112531. */
/* Address of array reference is scev. */
-/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 1 "ivopts" } } */
+/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 1 "ivopts" { xfail { riscv_v && vect_variable_length } } } } */
@@ -22,5 +22,6 @@ foo (int n)
return 0;
}
+/* Xfail riscv PR112531. */
/* Address of array reference to b is scev. */
-/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 2 "ivopts" } } */
+/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 2 "ivopts" { xfail { riscv_v && vect_variable_length } } } } */
@@ -7,4 +7,6 @@ void t(unsigned int n)
for (i=0; i<n; i++)
a[i]++;
}
-/* { dg-final { scan-tree-dump "Overflowness wrto loop niter: No-overflow" "ivopts" } } */
+
+/* Xfail riscv PR112531. */
+/* { dg-final { scan-tree-dump "Overflowness wrto loop niter: No-overflow" "ivopts" {xfail { riscv_v && vect_variable_length } } } } */
@@ -17,6 +17,7 @@ foo (unsigned char s, unsigned char l)
return sum;
}
+/* Xfail riscv PR112531. */
/* Address of array reference is scev. */
-/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 1 "ivopts" } } */
+/* { dg-final { scan-tree-dump-times " Type:\\tREFERENCE ADDRESS\n" 1 "ivopts" {xfail { riscv_v && vect_variable_length } } } } */
@@ -11,4 +11,4 @@ void foo(unsigned long long *M)
}
}
-/* { dg-final { scan-tree-dump-times "join point for if-convertable half-diamond" 1 "split-paths" } } */
+/* { dg-final { scan-tree-dump-times "join point for if-convertable half-diamond" 1 "split-paths" { xfail { riscv_v && { vect_variable_length && lp64 } } } } } */
@@ -27,4 +27,4 @@ foo ()
but the loop reads only one element at a time, and DOM cannot resolve these.
The same happens on powerpc depending on the SIMD support available. */
-/* { dg-final { scan-tree-dump "return 28;" "optimized" { xfail { { alpha*-*-* hppa*64*-*-* nvptx*-*-* mmix-knuth-mmixware } || { { { lp64 && { powerpc*-*-* sparc*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } } } } */
+/* { dg-final { scan-tree-dump "return 28;" "optimized" { xfail { { { alpha*-*-* hppa*64*-*-* nvptx*-*-* mmix-knuth-mmixware } || { { { lp64 && { powerpc*-*-* sparc*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } || { riscv*-*-* && { ! riscv_v } } } } } } */
@@ -20,4 +20,4 @@ main (int argc, char **argv)
foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
exit (0);
}
-/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "optimized" { xfail cris-*-* } } } Xfail: PR110628 */
+/* { dg-final { scan-tree-dump-times "Invalid sum" 0 "optimized" { xfail { cris-*-* riscv*-*-* } } } } Xfail: PR110628 */
@@ -9,9 +9,11 @@ int t(struct a *a, int n)
for (i=0;i<n;i++)
a->a[i]++;
}
+
+/* Xfail riscv PR112531. */
/* { dg-final { scan-rtl-dump-not "Unrolled loop" "loop2_unroll" } } */
-/* { dg-final { scan-rtl-dump "likely upper bound: 6" "loop2_unroll" } } */
-/* { dg-final { scan-rtl-dump "realistic bound: -1" "loop2_unroll" } } */
-/* { dg-final { scan-rtl-dump "Not unrolling loop, doesn't roll" "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump "likely upper bound: 6" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */
+/* { dg-final { scan-rtl-dump "realistic bound: -1" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */
+/* { dg-final { scan-rtl-dump "Not unrolling loop, doesn't roll" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */
/* { dg-final { scan-rtl-dump-not "Invalid sum" "loop2_unroll" } } */
/* { dg-final { scan-rtl-dump-not "upper bound: -1" "loop2_unroll" } } */
@@ -25,4 +25,5 @@ int main (void)
return foo (10);
}
-/* { dg-final { scan-rtl-dump "Expanding Accumulator" "loop2_unroll" } } */
+/* Xfail riscv PR111311. */
+/* { dg-final { scan-rtl-dump "Expanding Accumulator" "loop2_unroll" { xfail { riscv_v && vect_variable_length } } } } */
@@ -47,4 +47,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump "Data access with gaps requires scalar epilogue loop" "vect" { target { vect_perm && vect_int } } } } */
+/* Xfail riscv PR112531. */
+/* { dg-final { scan-tree-dump "Data access with gaps requires scalar epilogue loop" "vect" { target { vect_perm && vect_int } xfail { riscv_v && vect_variable_length } } } } */
@@ -56,4 +56,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump "peeling for gaps insufficient for access" "vect" { target { vect_perm_short } } } } */
+/* Xfail riscv PR112531. */
+/* { dg-final { scan-tree-dump "peeling for gaps insufficient for access" "vect" { target { vect_perm_short } xfail { riscv_v && vect_variable_length } } } } */
@@ -18,5 +18,5 @@ int t(b *a)
/* The memory access is through a pointer of type c which means
*ptr is not aligned. */
-/* { dg-final { scan-tree-dump "can't force alignment" "vect" { xfail vect_element_align_preferred } } } */
-/* { dg-final { scan-tree-dump-not "misalign = 0" "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump "can't force alignment" "vect" { xfail { vect_element_align_preferred || { riscv*-*-* && { ! riscv_v } } } } } } */
+/* { dg-final { scan-tree-dump-not "misalign = 0" "vect" { xfail { vect_element_align_preferred || { riscv*-*-* && { ! riscv_v } } } } } } */
@@ -704,7 +704,8 @@ CALL track('KERNEL ')
RETURN
END SUBROUTINE kernel
+! Xfail riscv PR112531.
! { dg-final { scan-tree-dump-times "vectorized 25 loops" 1 "vect" { target aarch64_sve } } }
! { dg-final { scan-tree-dump-times "vectorized 24 loops" 1 "vect" { target { aarch64*-*-* && { ! aarch64_sve } } } } }
-! { dg-final { scan-tree-dump-times "vectorized 2\[234\] loops" 1 "vect" { target { vect_intdouble_cvt && { ! aarch64*-*-* } } } } }
+! { dg-final { scan-tree-dump-times "vectorized 2\[234\] loops" 1 "vect" { target { vect_intdouble_cvt && { ! aarch64*-*-* } } xfail { riscv_v && vect_variable_length } } } }
! { dg-final { scan-tree-dump-times "vectorized 17 loops" 1 "vect" { target { { ! vect_intdouble_cvt } && { ! aarch64*-*-* } } } } }
@@ -1898,6 +1898,9 @@ proc check_effective_target_riscv_d { } {
# Cache the result.
proc check_effective_target_riscv_v { } {
+ if { ![istarget riscv*-*-*] } {
+ return 0
+ }
return [check_no_compiler_messages riscv_ext_v assembly {
#ifndef __riscv_v
#error "Not __riscv_v"
Clean up scan dump failures on linux rv64 vector targets Juzhe mentioned could be ignored for now. This will help reduce noise and make it more obvious if a bug or regression is introduced. The failures that are still reported are either execution failures or failures that are also present on armv8-a+sve gcc/testsuite/ChangeLog: * c-c++-common/vector-subscript-4.c: xfail testcase * g++.dg/tree-ssa/pr83518.C: ditto * gcc.dg/attr-alloc_size-11.c: remove xfail * gcc.dg/signbit-2.c: xfail testcase * gcc.dg/signbit-5.c: ditto * gcc.dg/tree-ssa/cunroll-16.c: ditto * gcc.dg/tree-ssa/gen-vect-34.c: ditto * gcc.dg/tree-ssa/loop-bound-1.c: ditto * gcc.dg/tree-ssa/loop-bound-2.c: ditto * gcc.dg/tree-ssa/pr84512.c: remove xfail * gcc.dg/tree-ssa/predcom-4.c: xfail testcase * gcc.dg/tree-ssa/predcom-5.c: ditto * gcc.dg/tree-ssa/predcom-9.c: ditto * gcc.dg/tree-ssa/reassoc-46.c: ditto * gcc.dg/tree-ssa/scev-10.c: ditto * gcc.dg/tree-ssa/scev-11.c: ditto * gcc.dg/tree-ssa/scev-14.c: ditto * gcc.dg/tree-ssa/scev-9.c: ditto * gcc.dg/tree-ssa/split-path-11.c: ditto * gcc.dg/tree-ssa/ssa-dom-cse-2.c: ditto * gcc.dg/tree-ssa/update-threading.c: ditto * gcc.dg/unroll-8.c: ditto * gcc.dg/var-expand1.c: ditto * gcc.dg/vect/pr103116-1.c: ditto * gcc.dg/vect/pr103116-2.c: ditto * gcc.dg/vect/pr65310.c: ditto * gfortran.dg/vect/vect-8.f90: ditto * lib/target-supports.exp: ditto Signed-off-by: Edwin Lu <ewlu@rivosinc.com> --- V2 changes: - added attr-alloc_size-11.c and update-threading.c which were missed in previous patch - remove pr83232.f90 xfail since it was fixed in a recent trunk update - adjust xfail on split-path-11.c to only apply to rv64 --- gcc/testsuite/c-c++-common/vector-subscript-4.c | 3 ++- gcc/testsuite/g++.dg/tree-ssa/pr83518.C | 2 +- gcc/testsuite/gcc.dg/attr-alloc_size-11.c | 4 ++-- gcc/testsuite/gcc.dg/signbit-2.c | 5 +++-- gcc/testsuite/gcc.dg/signbit-5.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/cunroll-16.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/gen-vect-34.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/loop-bound-1.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/loop-bound-2.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/pr84512.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/predcom-4.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/predcom-5.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/predcom-9.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/reassoc-46.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/scev-10.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/scev-11.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/scev-14.c | 4 +++- gcc/testsuite/gcc.dg/tree-ssa/scev-9.c | 3 ++- gcc/testsuite/gcc.dg/tree-ssa/split-path-11.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/update-threading.c | 2 +- gcc/testsuite/gcc.dg/unroll-8.c | 8 +++++--- gcc/testsuite/gcc.dg/var-expand1.c | 3 ++- gcc/testsuite/gcc.dg/vect/pr103116-1.c | 3 ++- gcc/testsuite/gcc.dg/vect/pr103116-2.c | 3 ++- gcc/testsuite/gcc.dg/vect/pr65310.c | 4 ++-- gcc/testsuite/gfortran.dg/vect/vect-8.f90 | 3 ++- gcc/testsuite/lib/target-supports.exp | 3 +++ 28 files changed, 59 insertions(+), 34 deletions(-)