]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V Regression: Fix FAIL of vect-multitypes-16.c for RVV
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Tue, 10 Oct 2023 14:49:13 +0000 (22:49 +0800)
committerPan Li <pan2.li@intel.com>
Wed, 11 Oct 2023 01:07:51 +0000 (09:07 +0800)
As Richard suggested: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632288.html

Add vect_ext_char_longlong to fix FAIL for RVV.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/vect-multitypes-16.c: Adapt check for RVV.
* lib/target-supports.exp: Add vect_ext_char_longlong property.

gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c
gcc/testsuite/lib/target-supports.exp

index a61f1a9a2215e238f6c67e229f642db6ec07a00c..fd17ad7437ed14201b5c333a961d456017f0b67c 100644 (file)
@@ -35,6 +35,6 @@ int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_unpack } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { vect_unpack } || { vect_variable_length && vect_ext_char_longlong } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_unpack } && {! { vect_variable_length && vect_ext_char_longlong } } } } } } */
 
index 95c489d7f76e2332b87193ab36e5a7469a323833..b454b07359a3e43ce5317a029d2298677924cd02 100644 (file)
@@ -4215,6 +4215,15 @@ proc check_effective_target_vect_floatuint_cvt { } {
                && [check_effective_target_riscv_v]) }}]
 }
 
+# Return 1 if the target supports vector integer char -> long long extend optab
+#
+
+proc check_effective_target_vect_ext_char_longlong { } {
+    return [check_cached_effective_target_indexed vect_ext_char_longlong {
+      expr { ([istarget riscv*-*-*]
+             && [check_effective_target_riscv_v]) }}]
+}
+
 # Return 1 if peeling for alignment might be profitable on the target
 #