[RFC,2/2] RISC-V: Update testsuite for type-changed builtins

Message ID d68806e290262ac43dfaa898e883bb85eece71a6.1694053004.git.research_trasio@irq.a4lg.com
State Accepted
Headers
Series RISC-V: Change RISC-V bit manipulation / scalar crypto builtin types |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Tsukasa OI Sept. 7, 2023, 2:17 a.m. UTC
  From: Tsukasa OI <research_trasio@irq.a4lg.com>

This commit replaces the type of the builtin used in the testsuite.

Even without this commit, it won't cause any test failures but changed so
that no confusion occurs.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/zbc32.c: Make signed type to unsigned.
	* gcc.target/riscv/zbc64.c: Ditto.
	* gcc.target/riscv/zbkb32.c: Ditto.
	* gcc.target/riscv/zbkb64.c: Ditto.
	* gcc.target/riscv/zbkc32.c: Ditto.
	* gcc.target/riscv/zbkc64.c: Ditto.
	* gcc.target/riscv/zbkx32.c: Ditto.
	* gcc.target/riscv/zbkx64.c: Ditto.
	* gcc.target/riscv/zknd32.c: Ditto.
	* gcc.target/riscv/zknd64.c: Ditto.
	* gcc.target/riscv/zkne32.c: Ditto.
	* gcc.target/riscv/zkne64.c: Ditto.
	* gcc.target/riscv/zknh-sha256.c: Ditto.
	* gcc.target/riscv/zknh-sha512-32.c: Ditto.
	* gcc.target/riscv/zknh-sha512-64.c: Ditto.
	* gcc.target/riscv/zksed32.c: Ditto.
	* gcc.target/riscv/zksed64.c: Ditto.
	* gcc.target/riscv/zksh32.c: Ditto.
	* gcc.target/riscv/zksh64.c: Ditto.
---
 gcc/testsuite/gcc.target/riscv/zbc32.c          |  6 +++---
 gcc/testsuite/gcc.target/riscv/zbc64.c          |  6 +++---
 gcc/testsuite/gcc.target/riscv/zbkb32.c         | 10 +++++-----
 gcc/testsuite/gcc.target/riscv/zbkb64.c         |  8 ++++----
 gcc/testsuite/gcc.target/riscv/zbkc32.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zbkc64.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zbkx32.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zbkx64.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zknd32.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zknd64.c         | 10 +++++-----
 gcc/testsuite/gcc.target/riscv/zkne32.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zkne64.c         |  8 ++++----
 gcc/testsuite/gcc.target/riscv/zknh-sha256.c    |  8 ++++----
 gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c | 12 ++++++------
 gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c |  8 ++++----
 gcc/testsuite/gcc.target/riscv/zksed32.c        |  4 ++--
 gcc/testsuite/gcc.target/riscv/zksed64.c        |  4 ++--
 gcc/testsuite/gcc.target/riscv/zksh32.c         |  4 ++--
 gcc/testsuite/gcc.target/riscv/zksh64.c         |  4 ++--
 19 files changed, 58 insertions(+), 58 deletions(-)
  

Comments

Jeff Law Sept. 17, 2023, 3:58 p.m. UTC | #1
On 9/6/23 20:17, Tsukasa OI wrote:
> From: Tsukasa OI <research_trasio@irq.a4lg.com>
> 
> This commit replaces the type of the builtin used in the testsuite.
> 
> Even without this commit, it won't cause any test failures but changed so
> that no confusion occurs.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/riscv/zbc32.c: Make signed type to unsigned.
> 	* gcc.target/riscv/zbc64.c: Ditto.
> 	* gcc.target/riscv/zbkb32.c: Ditto.
> 	* gcc.target/riscv/zbkb64.c: Ditto.
> 	* gcc.target/riscv/zbkc32.c: Ditto.
> 	* gcc.target/riscv/zbkc64.c: Ditto.
> 	* gcc.target/riscv/zbkx32.c: Ditto.
> 	* gcc.target/riscv/zbkx64.c: Ditto.
> 	* gcc.target/riscv/zknd32.c: Ditto.
> 	* gcc.target/riscv/zknd64.c: Ditto.
> 	* gcc.target/riscv/zkne32.c: Ditto.
> 	* gcc.target/riscv/zkne64.c: Ditto.
> 	* gcc.target/riscv/zknh-sha256.c: Ditto.
> 	* gcc.target/riscv/zknh-sha512-32.c: Ditto.
> 	* gcc.target/riscv/zknh-sha512-64.c: Ditto.
> 	* gcc.target/riscv/zksed32.c: Ditto.
> 	* gcc.target/riscv/zksed64.c: Ditto.
> 	* gcc.target/riscv/zksh32.c: Ditto.
> 	* gcc.target/riscv/zksh64.c: Ditto.
OK
jeff
  

Patch

diff --git a/gcc/testsuite/gcc.target/riscv/zbc32.c b/gcc/testsuite/gcc.target/riscv/zbc32.c
index 08705c4a687e..f3fb2238f7f4 100644
--- a/gcc/testsuite/gcc.target/riscv/zbc32.c
+++ b/gcc/testsuite/gcc.target/riscv/zbc32.c
@@ -3,17 +3,17 @@ 
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1, int32_t rs2)
+uint32_t foo1(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_clmul(rs1, rs2);
 }
 
-int32_t foo2(int32_t rs1, int32_t rs2)
+uint32_t foo2(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_clmulh(rs1, rs2);
 }
 
-int32_t foo3(int32_t rs1, int32_t rs2)
+uint32_t foo3(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_clmulr(rs1, rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbc64.c b/gcc/testsuite/gcc.target/riscv/zbc64.c
index a19f42b2883f..841a0aa7847d 100644
--- a/gcc/testsuite/gcc.target/riscv/zbc64.c
+++ b/gcc/testsuite/gcc.target/riscv/zbc64.c
@@ -3,17 +3,17 @@ 
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1, int64_t rs2)
+uint64_t foo1(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_clmul(rs1, rs2);
 }
 
-int64_t foo2(int64_t rs1, int64_t rs2)
+uint64_t foo2(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_clmulh(rs1, rs2);
 }
 
-int64_t foo3(int64_t rs1, int64_t rs2)
+uint64_t foo3(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_clmulr(rs1, rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbkb32.c b/gcc/testsuite/gcc.target/riscv/zbkb32.c
index dd45b8b9dc72..b2e442dc49d8 100644
--- a/gcc/testsuite/gcc.target/riscv/zbkb32.c
+++ b/gcc/testsuite/gcc.target/riscv/zbkb32.c
@@ -4,27 +4,27 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo1(int16_t rs1, int16_t rs2)
+uint32_t foo1(uint16_t rs1, uint16_t rs2)
 {
     return __builtin_riscv_pack(rs1, rs2);
 }
 
-int32_t foo2(int8_t rs1, int8_t rs2)
+uint32_t foo2(uint8_t rs1, uint8_t rs2)
 {
     return __builtin_riscv_packh(rs1, rs2);
 }
 
-int32_t foo3(int32_t rs1)
+uint32_t foo3(uint32_t rs1)
 {
     return __builtin_riscv_brev8(rs1);
 }
 
-int32_t foo4(int32_t rs1)
+uint32_t foo4(uint32_t rs1)
 {
     return __builtin_riscv_zip(rs1);
 }
 
-int32_t foo5(int32_t rs1)
+uint32_t foo5(uint32_t rs1)
 {
     return __builtin_riscv_unzip(rs1);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbkb64.c b/gcc/testsuite/gcc.target/riscv/zbkb64.c
index 960a2ae30ed6..08ac9c2a9f00 100644
--- a/gcc/testsuite/gcc.target/riscv/zbkb64.c
+++ b/gcc/testsuite/gcc.target/riscv/zbkb64.c
@@ -3,22 +3,22 @@ 
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 #include <stdint-gcc.h>
 
-int64_t foo1(int32_t rs1, int32_t rs2)
+uint64_t foo1(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_pack(rs1, rs2);
 }
 
-int64_t foo2(int8_t rs1, int8_t rs2)
+uint64_t foo2(uint8_t rs1, uint8_t rs2)
 {
     return __builtin_riscv_packh(rs1, rs2);
 }
 
-int64_t foo3(int16_t rs1, int16_t rs2)
+uint64_t foo3(uint16_t rs1, uint16_t rs2)
 {
     return __builtin_riscv_packw(rs1, rs2);
 }
 
-int64_t foo4(int64_t rs1, int64_t rs2)
+uint64_t foo4(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_brev8(rs1);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbkc32.c b/gcc/testsuite/gcc.target/riscv/zbkc32.c
index a8e29200250b..29f0d624a7d7 100644
--- a/gcc/testsuite/gcc.target/riscv/zbkc32.c
+++ b/gcc/testsuite/gcc.target/riscv/zbkc32.c
@@ -3,12 +3,12 @@ 
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1, int32_t rs2)
+uint32_t foo1(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_clmul(rs1, rs2);
 }
 
-int32_t foo2(int32_t rs1, int32_t rs2)
+uint32_t foo2(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_clmulh(rs1, rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbkc64.c b/gcc/testsuite/gcc.target/riscv/zbkc64.c
index 728f8baf099d..53e6ac215ed3 100644
--- a/gcc/testsuite/gcc.target/riscv/zbkc64.c
+++ b/gcc/testsuite/gcc.target/riscv/zbkc64.c
@@ -3,12 +3,12 @@ 
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1, int64_t rs2)
+uint64_t foo1(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_clmul(rs1, rs2);
 }
 
-int64_t foo2(int64_t rs1, int64_t rs2)
+uint64_t foo2(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_clmulh(rs1, rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbkx32.c b/gcc/testsuite/gcc.target/riscv/zbkx32.c
index bd95524f548b..b8b822a7c499 100644
--- a/gcc/testsuite/gcc.target/riscv/zbkx32.c
+++ b/gcc/testsuite/gcc.target/riscv/zbkx32.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo3(int32_t rs1, int32_t rs2)
+uint32_t foo3(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_xperm8(rs1, rs2);
 }
 
-int32_t foo4(int32_t rs1, int32_t rs2)
+uint32_t foo4(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_xperm4(rs1, rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zbkx64.c b/gcc/testsuite/gcc.target/riscv/zbkx64.c
index 2a04a94b86c4..732436701b33 100644
--- a/gcc/testsuite/gcc.target/riscv/zbkx64.c
+++ b/gcc/testsuite/gcc.target/riscv/zbkx64.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1, int64_t rs2)
+uint64_t foo1(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_xperm8(rs1, rs2);
 }
 
-int64_t foo2(int64_t rs1, int64_t rs2)
+uint64_t foo2(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_xperm4(rs1, rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zknd32.c b/gcc/testsuite/gcc.target/riscv/zknd32.c
index 5fcc66da9015..e60c027e0911 100644
--- a/gcc/testsuite/gcc.target/riscv/zknd32.c
+++ b/gcc/testsuite/gcc.target/riscv/zknd32.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1, int32_t rs2, int bs)
+uint32_t foo1(uint32_t rs1, uint32_t rs2, int bs)
 {
     return __builtin_riscv_aes32dsi(rs1,rs2,bs);
 }
 
-int32_t foo2(int32_t rs1, int32_t rs2, int bs)
+uint32_t foo2(uint32_t rs1, uint32_t rs2, int bs)
 {
     return __builtin_riscv_aes32dsmi(rs1,rs2,bs);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zknd64.c b/gcc/testsuite/gcc.target/riscv/zknd64.c
index b1dff98f7e21..910b91c6ed88 100644
--- a/gcc/testsuite/gcc.target/riscv/zknd64.c
+++ b/gcc/testsuite/gcc.target/riscv/zknd64.c
@@ -4,27 +4,27 @@ 
 
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1, int64_t rs2)
+uint64_t foo1(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_aes64ds(rs1,rs2);
 }
 
-int64_t foo2(int64_t rs1, int64_t rs2)
+uint64_t foo2(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_aes64dsm(rs1,rs2);
 }
 
-int64_t foo3(int64_t rs1, int rnum)
+uint64_t foo3(uint64_t rs1, unsigned rnum)
 {
     return __builtin_riscv_aes64ks1i(rs1,rnum);
 }
 
-int64_t foo4(int64_t rs1, int64_t rs2)
+uint64_t foo4(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_aes64ks2(rs1,rs2);
 }
 
-int64_t foo5(int64_t rs1)
+uint64_t foo5(uint64_t rs1)
 {
     return __builtin_riscv_aes64im(rs1);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zkne32.c b/gcc/testsuite/gcc.target/riscv/zkne32.c
index c131c9a6bbb1..252e9ffa43b3 100644
--- a/gcc/testsuite/gcc.target/riscv/zkne32.c
+++ b/gcc/testsuite/gcc.target/riscv/zkne32.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1, int32_t rs2, int bs)
+uint32_t foo1(uint32_t rs1, uint32_t rs2, unsigned bs)
 {
     return __builtin_riscv_aes32esi(rs1, rs2, bs);
 }
 
-int32_t foo2(int32_t rs1, int32_t rs2, int bs)
+uint32_t foo2(uint32_t rs1, uint32_t rs2, unsigned bs)
 {
     return __builtin_riscv_aes32esmi(rs1, rs2, bs);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zkne64.c b/gcc/testsuite/gcc.target/riscv/zkne64.c
index 7d82b5a5d411..b25f6b5c29ac 100644
--- a/gcc/testsuite/gcc.target/riscv/zkne64.c
+++ b/gcc/testsuite/gcc.target/riscv/zkne64.c
@@ -4,22 +4,22 @@ 
 
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1, int64_t rs2)
+uint64_t foo1(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_aes64es(rs1,rs2);
 }
 
-int64_t foo2(int64_t rs1, int64_t rs2)
+uint64_t foo2(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_aes64esm(rs1,rs2);
 }
 
-int64_t foo3(int64_t rs1, int rnum)
+uint64_t foo3(uint64_t rs1, unsigned rnum)
 {
     return __builtin_riscv_aes64ks1i(rs1,rnum);
 }
 
-int64_t foo4(int64_t rs1, int64_t rs2)
+uint64_t foo4(uint64_t rs1, uint64_t rs2)
 {
     return __builtin_riscv_aes64ks2(rs1,rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zknh-sha256.c b/gcc/testsuite/gcc.target/riscv/zknh-sha256.c
index 54329aa6af2e..952d611cd0b9 100644
--- a/gcc/testsuite/gcc.target/riscv/zknh-sha256.c
+++ b/gcc/testsuite/gcc.target/riscv/zknh-sha256.c
@@ -2,22 +2,22 @@ 
 /* { dg-options "-O2 -march=rv64gc_zknh -mabi=lp64" } */
 /* { dg-skip-if "" { *-*-* } { "-g" "-flto"} } */
 
-long foo1(long rs1)
+unsigned long foo1(unsigned long rs1)
 {
     return __builtin_riscv_sha256sig0(rs1);
 }
 
-long foo2(long rs1)
+unsigned long foo2(unsigned long rs1)
 {
     return __builtin_riscv_sha256sig1(rs1);
 }
 
-long foo3(long rs1)
+unsigned long foo3(unsigned long rs1)
 {
     return __builtin_riscv_sha256sum0(rs1);
 }
 
-long foo4(long rs1)
+unsigned long foo4(unsigned long rs1)
 {
     return __builtin_riscv_sha256sum1(rs1);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c b/gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c
index 4ebc470f8ab7..f2bcae36a1f2 100644
--- a/gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c
+++ b/gcc/testsuite/gcc.target/riscv/zknh-sha512-32.c
@@ -4,32 +4,32 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1, int32_t rs2)
+uint32_t foo1(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_sha512sig0h(rs1,rs2);
 }
 
-int32_t foo2(int32_t rs1, int32_t rs2)
+uint32_t foo2(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_sha512sig0l(rs1,rs2);
 }
 
-int32_t foo3(int32_t rs1, int32_t rs2)
+uint32_t foo3(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_sha512sig1h(rs1,rs2);
 }
 
-int32_t foo4(int32_t rs1, int32_t rs2)
+uint32_t foo4(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_sha512sig1l(rs1,rs2);
 }
 
-int32_t foo5(int32_t rs1, int32_t rs2)
+uint32_t foo5(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_sha512sum0r(rs1,rs2);
 }
 
-int32_t foo6(int32_t rs1, int32_t rs2)
+uint32_t foo6(uint32_t rs1, uint32_t rs2)
 {
     return __builtin_riscv_sha512sum1r(rs1,rs2);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c b/gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c
index 0fb5c75b9ce6..4f248575e66e 100644
--- a/gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c
+++ b/gcc/testsuite/gcc.target/riscv/zknh-sha512-64.c
@@ -4,22 +4,22 @@ 
 
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1)
+uint64_t foo1(uint64_t rs1)
 {
     return __builtin_riscv_sha512sig0(rs1);
 }
 
-int64_t foo2(int64_t rs1)
+uint64_t foo2(uint64_t rs1)
 {
     return __builtin_riscv_sha512sig1(rs1);
 }
 
-int64_t foo3(int64_t rs1)
+uint64_t foo3(uint64_t rs1)
 {
     return __builtin_riscv_sha512sum0(rs1);
 }
 
-int64_t foo4(int64_t rs1)
+uint64_t foo4(uint64_t rs1)
 {
     return __builtin_riscv_sha512sum1(rs1);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zksed32.c b/gcc/testsuite/gcc.target/riscv/zksed32.c
index 9548d007cb22..7df04147e05c 100644
--- a/gcc/testsuite/gcc.target/riscv/zksed32.c
+++ b/gcc/testsuite/gcc.target/riscv/zksed32.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1, int32_t rs2, int bs)
+uint32_t foo1(uint32_t rs1, uint32_t rs2, unsigned bs)
 {
     return __builtin_riscv_sm4ks(rs1,rs2,bs);
 }
 
-int32_t foo2(int32_t rs1, int32_t rs2, int bs)
+uint32_t foo2(uint32_t rs1, uint32_t rs2, unsigned bs)
 {
     return __builtin_riscv_sm4ed(rs1,rs2,bs);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zksed64.c b/gcc/testsuite/gcc.target/riscv/zksed64.c
index 190a654151db..3485adf9cd88 100644
--- a/gcc/testsuite/gcc.target/riscv/zksed64.c
+++ b/gcc/testsuite/gcc.target/riscv/zksed64.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1, int64_t rs2, int bs)
+uint64_t foo1(uint64_t rs1, uint64_t rs2, unsigned bs)
 {
     return __builtin_riscv_sm4ks(rs1,rs2,bs);
 }
 
-int64_t foo2(int64_t rs1, int64_t rs2, int bs)
+uint64_t foo2(uint64_t rs1, uint64_t rs2, unsigned bs)
 {
     return __builtin_riscv_sm4ed(rs1,rs2,bs);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zksh32.c b/gcc/testsuite/gcc.target/riscv/zksh32.c
index 50370b58b7a9..20513f986f88 100644
--- a/gcc/testsuite/gcc.target/riscv/zksh32.c
+++ b/gcc/testsuite/gcc.target/riscv/zksh32.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int32_t foo1(int32_t rs1)
+uint32_t foo1(uint32_t rs1)
 {
     return __builtin_riscv_sm3p0(rs1);
 }
 
-int32_t foo2(int32_t rs1)
+uint32_t foo2(uint32_t rs1)
 {
     return __builtin_riscv_sm3p1(rs1);
 }
diff --git a/gcc/testsuite/gcc.target/riscv/zksh64.c b/gcc/testsuite/gcc.target/riscv/zksh64.c
index 69847f3df359..bdd137872785 100644
--- a/gcc/testsuite/gcc.target/riscv/zksh64.c
+++ b/gcc/testsuite/gcc.target/riscv/zksh64.c
@@ -4,12 +4,12 @@ 
 
 #include <stdint-gcc.h>
 
-int64_t foo1(int64_t rs1)
+uint64_t foo1(uint64_t rs1)
 {
     return __builtin_riscv_sm3p0(rs1);
 }
 
-int64_t foo2(int64_t rs1)
+uint64_t foo2(uint64_t rs1)
 {
     return __builtin_riscv_sm3p1(rs1);
 }