]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
internal-fn: Fix bug of BIAS argument index
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Sun, 25 Jun 2023 03:36:54 +0000 (11:36 +0800)
committerPan Li <pan2.li@intel.com>
Sun, 25 Jun 2023 13:49:16 +0000 (21:49 +0800)
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.

gcc/ChangeLog:

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

gcc/internal-fn.cc

index 1c2fd487e2a957d0d1dd0cdd4a7583028c0be31b..9017176dc7a572c79b54ff8a71684e6af15b90ae 100644 (file)
@@ -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));