* [PATCH] RISC-V: Fixed ICE caused by missing operand
@ 2023-09-20 5:39 Lehua Ding
[not found] ` <2F27A0EC795BA91C+FBDD6248-6460-446A-8BA6-B3A03027755A@rivai.ai>
0 siblings, 1 reply; 2+ messages in thread
From: Lehua Ding @ 2023-09-20 5:39 UTC (permalink / raw)
To: gcc-patches
Cc: juzhe.zhong, kito.cheng, rdapp.gcc, palmer, jeffreyalaw, lehua.ding
This ICE appears in GCC compiled with -O2 flags.
PR target/111488
gcc/ChangeLog:
* config/riscv/autovec-opt.md: Add missed operand.
---
gcc/config/riscv/autovec-opt.md | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/gcc/config/riscv/autovec-opt.md b/gcc/config/riscv/autovec-opt.md
index cef9f157e99..66c77ad6ebb 100644
--- a/gcc/config/riscv/autovec-opt.md
+++ b/gcc/config/riscv/autovec-opt.md
@@ -957,7 +957,8 @@
riscv_vector::emit_vlmax_insn (extend_icode, riscv_vector::UNARY_OP,
extend_ops);
- rtx ops[] = {operands[0], tmp, operands[3], operands[1]};
+ rtx ops[] = {operands[0], tmp, operands[3], operands[1],
+ RVV_VUNDEF(<MODE>mode)};
riscv_vector::emit_vlmax_insn (code_for_pred_mul_plus (<MODE>mode),
riscv_vector::TERNARY_OP, ops);
DONE;
@@ -1008,7 +1009,8 @@
rtx ext_ops[] = {tmp, operands[2]};
riscv_vector::emit_vlmax_insn (icode, riscv_vector::UNARY_OP, ext_ops);
- rtx ops[] = {operands[0], tmp, operands[3], operands[1]};
+ rtx ops[] = {operands[0], tmp, operands[3], operands[1],
+ RVV_VUNDEF(<MODE>mode)};
riscv_vector::emit_vlmax_insn (code_for_pred_mul (PLUS, <MODE>mode),
riscv_vector::TERNARY_OP_FRM_DYN, ops);
DONE;
@@ -1059,7 +1061,8 @@
rtx ext_ops[] = {tmp, operands[2]};
riscv_vector::emit_vlmax_insn (icode, riscv_vector::UNARY_OP, ext_ops);
- rtx ops[] = {operands[0], tmp, operands[3], operands[1]};
+ rtx ops[] = {operands[0], tmp, operands[3], operands[1],
+ RVV_VUNDEF(<MODE>mode)};
riscv_vector::emit_vlmax_insn (code_for_pred_mul_neg (PLUS, <MODE>mode),
riscv_vector::TERNARY_OP_FRM_DYN, ops);
DONE;
@@ -1110,7 +1113,8 @@
rtx ext_ops[] = {tmp, operands[2]};
riscv_vector::emit_vlmax_insn (icode, riscv_vector::UNARY_OP, ext_ops);
- rtx ops[] = {operands[0], tmp, operands[3], operands[1]};
+ rtx ops[] = {operands[0], tmp, operands[3], operands[1],
+ RVV_VUNDEF(<MODE>mode)};
riscv_vector::emit_vlmax_insn (code_for_pred_mul (MINUS, <MODE>mode),
riscv_vector::TERNARY_OP_FRM_DYN, ops);
DONE;
@@ -1163,7 +1167,8 @@
rtx ext_ops[] = {tmp, operands[2]};
riscv_vector::emit_vlmax_insn (icode, riscv_vector::UNARY_OP, ext_ops);
- rtx ops[] = {operands[0], tmp, operands[3], operands[1]};
+ rtx ops[] = {operands[0], tmp, operands[3], operands[1],
+ RVV_VUNDEF(<MODE>mode)};
riscv_vector::emit_vlmax_insn (code_for_pred_mul_neg (MINUS, <MODE>mode),
riscv_vector::TERNARY_OP_FRM_DYN, ops);
DONE;
--
2.36.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RISC-V: Fixed ICE caused by missing operand
[not found] ` <2F27A0EC795BA91C+FBDD6248-6460-446A-8BA6-B3A03027755A@rivai.ai>
@ 2023-09-20 6:16 ` Lehua Ding
0 siblings, 0 replies; 2+ messages in thread
From: Lehua Ding @ 2023-09-20 6:16 UTC (permalink / raw)
To: juzhe.zhong; +Cc: gcc-patches, kito.cheng, rdapp.gcc, palmer, jeffreyalaw
Committed, thanks Juzhe.
On 2023/9/20 14:03, juzhe.zhong wrote:
> LGTM
> ---- Replied Message ----
> From Lehua Ding<lehua.ding@rivai.ai> <mailto:lehua.ding@rivai.ai>
> Date 09/20/2023 13:39
> To gcc-patches@gcc.gnu.org<gcc-patches@gcc.gnu.org>
> <mailto:gcc-patches@gcc.gnu.org>
> Cc juzhe.zhong@rivai.ai<juzhe.zhong@rivai.ai> <mailto:juzhe.zhong@rivai.ai>,
> kito.cheng@gmail.com<kito.cheng@gmail.com> <mailto:kito.cheng@gmail.com>,
> rdapp.gcc@gmail.com<rdapp.gcc@gmail.com> <mailto:rdapp.gcc@gmail.com>,
> palmer@rivosinc.com<palmer@rivosinc.com> <mailto:palmer@rivosinc.com>,
> jeffreyalaw@gmail.com<jeffreyalaw@gmail.com> <mailto:jeffreyalaw@gmail.com>,
> lehua.ding@rivai.ai<lehua.ding@rivai.ai> <mailto:lehua.ding@rivai.ai>
> Subject [PATCH] RISC-V: Fixed ICE caused by missing operand
>
--
Best,
Lehua
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-20 6:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20 5:39 [PATCH] RISC-V: Fixed ICE caused by missing operand Lehua Ding
[not found] ` <2F27A0EC795BA91C+FBDD6248-6460-446A-8BA6-B3A03027755A@rivai.ai>
2023-09-20 6:16 ` Lehua Ding
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).