]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V Regression: Fix FAIL of bb-slp-pr65935.c for RVV
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Tue, 10 Oct 2023 01:39:04 +0000 (09:39 +0800)
committerLehua Ding <lehua.ding@rivai.ai>
Tue, 10 Oct 2023 10:23:40 +0000 (18:23 +0800)
Here is the reference comparing dump IR between ARM SVE and RVV.

https://godbolt.org/z/zqess8Gss

We can see RVV has one more dump IR:
optimized: basic block part vectorized using 128 byte vectors
since RVV has 1024 bit vectors.

The codegen is reasonable good.

However, I saw GCN also has 1024 bit vector.
This patch may cause this case FAIL in GCN port ?

Hi, GCN folk, could you check this patch in GCN port for me ?

gcc/testsuite/ChangeLog:

* gcc.dg/vect/bb-slp-pr65935.c: Add vect1024 variant.
* lib/target-supports.exp: Ditto.

gcc/testsuite/gcc.dg/vect/bb-slp-pr65935.c
gcc/testsuite/lib/target-supports.exp

index 8df35327e7ad02a674f3c4774f3af4bd17a9113d..9ef1330b47c817e16baaafa44c2b15108b9dd3a9 100644 (file)
@@ -67,7 +67,8 @@ int main()
 
 /* We should also be able to use 2-lane SLP to initialize the real and
    imaginary components in the first loop of main.  */
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 10 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 10 "slp1" { target {! { vect1024 } } } } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 11 "slp1" { target { { vect1024 } } } } } */
 /* We should see the s->phase[dir] operand splatted and no other operand built
    from scalars.  See PR97334.  */
 /* { dg-final { scan-tree-dump "Using a splat" "slp1" } } */
index dc366d35a0a1e502357f930335ec55ab329bdb08..95c489d7f76e2332b87193ab36e5a7469a323833 100644 (file)
@@ -8903,6 +8903,12 @@ proc check_effective_target_vect_variable_length { } {
     return [expr { [lindex [available_vector_sizes] 0] == 0 }]
 }
 
+# Return 1 if the target supports vectors of 1024 bits.
+
+proc check_effective_target_vect1024 { } {
+    return [expr { [lsearch -exact [available_vector_sizes] 1024] >= 0 }]
+}
+
 # Return 1 if the target supports vectors of 512 bits.
 
 proc check_effective_target_vect512 { } {