diff mbox series

[v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC]

Message ID 20240305085920.3960787-1-pan2.li@intel.com
State New
Headers show
Series [v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC] | expand

Commit Message

Li, Pan2 March 5, 2024, 8:59 a.m. UTC
From: Pan Li <pan2.li@intel.com>

Cleanup mode_size related code which is not used anymore. Below tests are
passed for this patch.

* The RVV fully regresssion test.

gcc/ChangeLog:

	* config/riscv/riscv.cc (riscv_v_adjust_bytesize): Cleanup unused
	mode_size related code.

Signed-off-by: Pan Li <pan2.li@intel.com>
---
 gcc/config/riscv/riscv.cc | 4 ----
 1 file changed, 4 deletions(-)

Comments

钟居哲 March 5, 2024, 9:14 a.m. UTC | #1
LGTM. Thanks for clean up.



juzhe.zhong@rivai.ai
 
From: pan2.li
Date: 2024-03-05 16:59
To: gcc-patches
CC: juzhe.zhong; kito.cheng; yanzhang.wang; Pan Li
Subject: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC]
From: Pan Li <pan2.li@intel.com>
 
Cleanup mode_size related code which is not used anymore. Below tests are
passed for this patch.
 
* The RVV fully regresssion test.
 
gcc/ChangeLog:
 
* config/riscv/riscv.cc (riscv_v_adjust_bytesize): Cleanup unused
mode_size related code.
 
Signed-off-by: Pan Li <pan2.li@intel.com>
---
gcc/config/riscv/riscv.cc | 4 ----
1 file changed, 4 deletions(-)
 
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 56cd8d2c23f..691d967de29 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -1527,10 +1527,6 @@ riscv_v_adjust_bytesize (machine_mode mode, int scale)
return BYTES_PER_RISCV_VECTOR;
       poly_int64 nunits = GET_MODE_NUNITS (mode);
-      poly_int64 mode_size = GET_MODE_SIZE (mode);
-
-      if (maybe_eq (mode_size, (uint16_t) -1))
- mode_size = riscv_vector_chunks * scale;
       if (nunits.coeffs[0] > 8)
return exact_div (nunits, 8);
Li, Pan2 March 5, 2024, 9:23 a.m. UTC | #2
Committed, thanks Juzhe.

Pan

From: juzhe.zhong@rivai.ai <juzhe.zhong@rivai.ai>
Sent: Tuesday, March 5, 2024 5:15 PM
To: Li, Pan2 <pan2.li@intel.com>; gcc-patches <gcc-patches@gcc.gnu.org>
Cc: kito.cheng <kito.cheng@gmail.com>; Wang, Yanzhang <yanzhang.wang@intel.com>; Li, Pan2 <pan2.li@intel.com>
Subject: Re: [PATCH v1] RISC-V: Cleanup unused code in riscv_v_adjust_bytesize [NFC]

LGTM. Thanks for clean up.
diff mbox series

Patch

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 56cd8d2c23f..691d967de29 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -1527,10 +1527,6 @@  riscv_v_adjust_bytesize (machine_mode mode, int scale)
 	return BYTES_PER_RISCV_VECTOR;
 
       poly_int64 nunits = GET_MODE_NUNITS (mode);
-      poly_int64 mode_size = GET_MODE_SIZE (mode);
-
-      if (maybe_eq (mode_size, (uint16_t) -1))
-	mode_size = riscv_vector_chunks * scale;
 
       if (nunits.coeffs[0] > 8)
 	return exact_div (nunits, 8);