diff mbox series

RISC-V: Fix warning of vxrm pattern

Message ID 20230523100958.340512-1-juzhe.zhong@rivai.ai
State New
Headers show
Series RISC-V: Fix warning of vxrm pattern | expand

Commit Message

juzhe.zhong@rivai.ai May 23, 2023, 10:09 a.m. UTC
From: Juzhe-Zhong <juzhe.zhong@rivai.ai>

I just notice the warning:
../../../riscv-gcc/gcc/config/riscv/vector.md:618:1: warning: source missing a mode?

gcc/ChangeLog:

        * config/riscv/vector.md: Add mode.

---
 gcc/config/riscv/vector.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law May 23, 2023, 1:42 p.m. UTC | #1
On 5/23/23 04:09, juzhe.zhong@rivai.ai wrote:
> From: Juzhe-Zhong <juzhe.zhong@rivai.ai>
> 
> I just notice the warning:
> ../../../riscv-gcc/gcc/config/riscv/vector.md:618:1: warning: source missing a mode?
> 
> gcc/ChangeLog:
> 
>          * config/riscv/vector.md: Add mode.
While I'm a big fan of the gen* warnings, I do wish they had a bit more 
smarts to avoid the missing mode warnings for arguments which are 
restricted to CONST_INTs which don't have modes.  Oh well.

OK for the trunk.

jeff
Li, Pan2 via Gcc-patches May 23, 2023, 2:26 p.m. UTC | #2
Committed, thanks Jeff.

Pan

-----Original Message-----
From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Jeff Law via Gcc-patches
Sent: Tuesday, May 23, 2023 9:43 PM
To: juzhe.zhong@rivai.ai; gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com; kito.cheng@sifive.com; palmer@dabbelt.com; palmer@rivosinc.com; rdapp.gcc@gmail.com
Subject: Re: [PATCH] RISC-V: Fix warning of vxrm pattern



On 5/23/23 04:09, juzhe.zhong@rivai.ai wrote:
> From: Juzhe-Zhong <juzhe.zhong@rivai.ai>
> 
> I just notice the warning:
> ../../../riscv-gcc/gcc/config/riscv/vector.md:618:1: warning: source missing a mode?
> 
> gcc/ChangeLog:
> 
>          * config/riscv/vector.md: Add mode.
While I'm a big fan of the gen* warnings, I do wish they had a bit more smarts to avoid the missing mode warnings for arguments which are restricted to CONST_INTs which don't have modes.  Oh well.

OK for the trunk.

jeff
diff mbox series

Patch

diff --git a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md
index ac244430970..13b94862693 100644
--- a/gcc/config/riscv/vector.md
+++ b/gcc/config/riscv/vector.md
@@ -617,7 +617,7 @@ 
 ;; Set VXRM
 (define_insn "vxrmsi"
   [(set (reg:SI VXRM_REGNUM)
-	(match_operand 0 "const_int_operand" "i"))]
+	(match_operand:SI 0 "const_int_operand" "i"))]
   "TARGET_VECTOR"
   "csrwi\tvxrm,%0"
   [(set_attr "type" "wrvxrm")