[BUG,FIX] RISC-V: Fix VLS DI mode of slide1 instruction attribute

Message ID 20231120041211.3957366-1-juzhe.zhong@rivai.ai
State Unresolved
Headers
Series [BUG,FIX] RISC-V: Fix VLS DI mode of slide1 instruction attribute |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

juzhe.zhong@rivai.ai Nov. 20, 2023, 4:12 a.m. UTC
  The slide1 attributes are wrong for SEW=64 VLS modes.

This patch fixes the following FAILs:

FAIL: gcc.c-torture/execute/pr89369.c   -O2  execution test
FAIL: gcc.c-torture/execute/pr89369.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.c-torture/execute/pr89369.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/pr89369.c   -O3 -g  execution test
FAIL: gcc.dg/pr96239.c execution test
FAIL: gcc.dg/vshift-5.c execution test
FAIL: gcc.dg/torture/pr61346.c   -O2  execution test
FAIL: gcc.dg/torture/pr61346.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.dg/torture/pr61346.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.dg/torture/pr61346.c   -O3 -g  execution test

gcc/ChangeLog:

	* config/riscv/vector-iterators.md: Fix bug.

---
 gcc/config/riscv/vector-iterators.md | 40 ++++++++++++++--------------
 1 file changed, 20 insertions(+), 20 deletions(-)
  

Comments

juzhe.zhong@rivai.ai Nov. 20, 2023, 5:08 a.m. UTC | #1
Oh. I suddenly realize this fix was included by Robin's indexed load/store fix patch.
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636654.html 




juzhe.zhong@rivai.ai
 
From: Juzhe-Zhong
Date: 2023-11-20 12:12
To: gcc-patches
CC: kito.cheng; kito.cheng; jeffreyalaw; rdapp.gcc; Juzhe-Zhong
Subject: [BUG FIX] RISC-V: Fix VLS DI mode of slide1 instruction attribute
The slide1 attributes are wrong for SEW=64 VLS modes.
 
This patch fixes the following FAILs:
 
FAIL: gcc.c-torture/execute/pr89369.c   -O2  execution test
FAIL: gcc.c-torture/execute/pr89369.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.c-torture/execute/pr89369.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/pr89369.c   -O3 -g  execution test
FAIL: gcc.dg/pr96239.c execution test
FAIL: gcc.dg/vshift-5.c execution test
FAIL: gcc.dg/torture/pr61346.c   -O2  execution test
FAIL: gcc.dg/torture/pr61346.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  execution test
FAIL: gcc.dg/torture/pr61346.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.dg/torture/pr61346.c   -O3 -g  execution test
 
gcc/ChangeLog:
 
* config/riscv/vector-iterators.md: Fix bug.
 
---
gcc/config/riscv/vector-iterators.md | 40 ++++++++++++++--------------
1 file changed, 20 insertions(+), 20 deletions(-)
 
diff --git a/gcc/config/riscv/vector-iterators.md b/gcc/config/riscv/vector-iterators.md
index 469875ce67c..859f7bd1cdc 100644
--- a/gcc/config/riscv/vector-iterators.md
+++ b/gcc/config/riscv/vector-iterators.md
@@ -3200,30 +3200,30 @@
(define_mode_attr VDEMOTE [
   (RVVM8DI "RVVM8SI") (RVVM4DI "RVVM4SI") (RVVM2DI "RVVM2SI") (RVVM1DI "RVVM1SI")
-  (V1DI "V1SI")
-  (V2DI "V2SI")
-  (V4DI "V4SI")
-  (V8DI "V8SI")
-  (V16DI "V16SI")
-  (V32DI "V32SI")
-  (V64DI "V64SI")
-  (V128DI "V128SI")
-  (V256DI "V256SI")
-  (V512DI "V512SI")
+  (V1DI "V2SI")
+  (V2DI "V4SI")
+  (V4DI "V8SI")
+  (V8DI "V16SI")
+  (V16DI "V32SI")
+  (V32DI "V64SI")
+  (V64DI "V128SI")
+  (V128DI "V256SI")
+  (V256DI "V512SI")
+  (V512DI "V1024SI")
])
(define_mode_attr VMDEMOTE [
   (RVVM8DI "RVVMF4BI") (RVVM4DI "RVVMF8BI") (RVVM2DI "RVVMF16BI") (RVVM1DI "RVVMF32BI")
-  (V1DI "V1BI")
-  (V2DI "V2BI")
-  (V4DI "V4BI")
-  (V8DI "V8BI")
-  (V16DI "V16BI")
-  (V32DI "V32BI")
-  (V64DI "V64BI")
-  (V128DI "V128BI")
-  (V256DI "V256BI")
-  (V512DI "V512BI")
+  (V1DI "V2BI")
+  (V2DI "V4BI")
+  (V4DI "V8BI")
+  (V8DI "V16BI")
+  (V16DI "V32BI")
+  (V32DI "V64BI")
+  (V64DI "V128BI")
+  (V128DI "V256BI")
+  (V256DI "V512BI")
+  (V512DI "V1024BI")
])
(define_mode_attr stride_predicate [
-- 
2.36.3
  

Patch

diff --git a/gcc/config/riscv/vector-iterators.md b/gcc/config/riscv/vector-iterators.md
index 469875ce67c..859f7bd1cdc 100644
--- a/gcc/config/riscv/vector-iterators.md
+++ b/gcc/config/riscv/vector-iterators.md
@@ -3200,30 +3200,30 @@ 
 
 (define_mode_attr VDEMOTE [
   (RVVM8DI "RVVM8SI") (RVVM4DI "RVVM4SI") (RVVM2DI "RVVM2SI") (RVVM1DI "RVVM1SI")
-  (V1DI "V1SI")
-  (V2DI "V2SI")
-  (V4DI "V4SI")
-  (V8DI "V8SI")
-  (V16DI "V16SI")
-  (V32DI "V32SI")
-  (V64DI "V64SI")
-  (V128DI "V128SI")
-  (V256DI "V256SI")
-  (V512DI "V512SI")
+  (V1DI "V2SI")
+  (V2DI "V4SI")
+  (V4DI "V8SI")
+  (V8DI "V16SI")
+  (V16DI "V32SI")
+  (V32DI "V64SI")
+  (V64DI "V128SI")
+  (V128DI "V256SI")
+  (V256DI "V512SI")
+  (V512DI "V1024SI")
 ])
 
 (define_mode_attr VMDEMOTE [
   (RVVM8DI "RVVMF4BI") (RVVM4DI "RVVMF8BI") (RVVM2DI "RVVMF16BI") (RVVM1DI "RVVMF32BI")
-  (V1DI "V1BI")
-  (V2DI "V2BI")
-  (V4DI "V4BI")
-  (V8DI "V8BI")
-  (V16DI "V16BI")
-  (V32DI "V32BI")
-  (V64DI "V64BI")
-  (V128DI "V128BI")
-  (V256DI "V256BI")
-  (V512DI "V512BI")
+  (V1DI "V2BI")
+  (V2DI "V4BI")
+  (V4DI "V8BI")
+  (V8DI "V16BI")
+  (V16DI "V32BI")
+  (V32DI "V64BI")
+  (V64DI "V128BI")
+  (V128DI "V256BI")
+  (V256DI "V512BI")
+  (V512DI "V1024BI")
 ])
 
 (define_mode_attr stride_predicate [