public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] internal-fn: Fix bug of BIAS argument index
@ 2023-06-25  3:36 juzhe.zhong
  2023-06-25 12:48 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: juzhe.zhong @ 2023-06-25  3:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: richard.sandiford, rguenther, jeffreyalaw, Ju-Zhe Zhong

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(-)

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));
-- 
2.36.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-25 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-25  3:36 [PATCH] internal-fn: Fix bug of BIAS argument index juzhe.zhong
2023-06-25 12:48 ` Jeff Law
2023-06-25 13:49   ` Li, Pan2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).