diff mbox series

internal-fn: Fix bug of BIAS argument index

Message ID 20230625033654.1150808-1-juzhe.zhong@rivai.ai
State New
Headers show
Series internal-fn: Fix bug of BIAS argument index | expand

Commit Message

juzhe.zhong@rivai.ai June 25, 2023, 3:36 a.m. UTC
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

When trying to enable LEN_MASK_{LOAD,STORE} in RISC-V port,
I found I made a mistake in case of argument index of BIAS.

This patch is an obvious fix,

Ok for trunk ?

gcc/ChangeLog:

        * internal-fn.cc (expand_partial_store_optab_fn): Fix bug of BIAS argument index.

---
 gcc/internal-fn.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law June 25, 2023, 12:48 p.m. UTC | #1
On 6/24/23 21:36, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> When trying to enable LEN_MASK_{LOAD,STORE} in RISC-V port,
> I found I made a mistake in case of argument index of BIAS.
> 
> This patch is an obvious fix,
> 
> Ok for trunk ?
> 
> gcc/ChangeLog:
> 
>          * internal-fn.cc (expand_partial_store_optab_fn): Fix bug of BIAS argument index.
OK
jeff
Li, Pan2 via Gcc-patches June 25, 2023, 1:49 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: Sunday, June 25, 2023 8:48 PM
To: juzhe.zhong@rivai.ai; gcc-patches@gcc.gnu.org
Cc: richard.sandiford@arm.com; rguenther@suse.de
Subject: Re: [PATCH] internal-fn: Fix bug of BIAS argument index



On 6/24/23 21:36, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> When trying to enable LEN_MASK_{LOAD,STORE} in RISC-V port,
> I found I made a mistake in case of argument index of BIAS.
> 
> This patch is an obvious fix,
> 
> Ok for trunk ?
> 
> gcc/ChangeLog:
> 
>          * internal-fn.cc (expand_partial_store_optab_fn): Fix bug of BIAS argument index.
OK
jeff
diff mbox series

Patch

diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc
index 1c2fd487e2a..9017176dc7a 100644
--- a/gcc/internal-fn.cc
+++ b/gcc/internal-fn.cc
@@ -2991,7 +2991,7 @@  expand_partial_store_optab_fn (internal_fn ifn, gcall *stmt, convert_optab optab
       maskt = gimple_call_arg (stmt, 3);
       mask = expand_normal (maskt);
       create_input_operand (&ops[3], mask, TYPE_MODE (TREE_TYPE (maskt)));
-      biast = gimple_call_arg (stmt, 4);
+      biast = gimple_call_arg (stmt, 5);
       bias = expand_normal (biast);
       create_input_operand (&ops[4], bias, QImode);
       icode = convert_optab_handler (optab, TYPE_MODE (type), GET_MODE (mask));