public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: qu <xianmiao@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-2456] C-SKY: Fix missing operand when do spilt for cskyv2_addcc and cskyv2_addcc_invert.
Date: Tue,  6 Sep 2022 07:13:55 +0000 (GMT)	[thread overview]
Message-ID: <20220906071355.478BA3851AB5@sourceware.org> (raw)

https://gcc.gnu.org/g:33b182f61280d991bd0bda33003b5ee2a16024e2

commit r13-2456-g33b182f61280d991bd0bda33003b5ee2a16024e2
Author: Xianmiao Qu <cooper.qu@linux.alibaba.com>
Date:   Tue Sep 6 15:10:36 2022 +0800

    C-SKY: Fix missing operand when do spilt for cskyv2_addcc and cskyv2_addcc_invert.
    
    It will cause ICE when compiling the case:
    gcc/testsuite/gcc.dg/params/blocksort-part.c
    
    gcc/
            * config/csky/csky.md (cskyv2_addcc): Fix missing operand.
            (cskyv2_addcc_invert): Likewise.

Diff:
---
 gcc/config/csky/csky.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/config/csky/csky.md b/gcc/config/csky/csky.md
index 6b05930a9fb..6a6592902ef 100644
--- a/gcc/config/csky/csky.md
+++ b/gcc/config/csky/csky.md
@@ -1279,7 +1279,8 @@
   "reload_completed && !rtx_equal_p (operands[0], operands[1])"
   [(set (match_dup 0)
 	(if_then_else:SI (ne (reg:CC CSKY_CC_REGNUM) (const_int 0))
-			 (plus:SI (match_dup 0) (match_dup 2))))]
+			 (plus:SI (match_dup 0) (match_dup 2))
+			 (match_dup 0)))]
   {
     emit_insn (gen_movf (copy_rtx (operands[0]),
 			 copy_rtx (operands[1]),
@@ -1305,7 +1306,8 @@
   "reload_completed && !rtx_equal_p (operands[0], operands[1])"
   [(set (match_dup 0)
 	(if_then_else:SI (eq (reg:CC CSKY_CC_REGNUM) (const_int 0))
-			 (plus:SI (match_dup 0) (match_dup 2))))]
+			 (plus:SI (match_dup 0) (match_dup 2))
+			 (match_dup 0)))]
   {
     emit_insn (gen_movt (copy_rtx (operands[0]),
 			 copy_rtx (operands[1]),

                 reply	other threads:[~2022-09-06  7:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220906071355.478BA3851AB5@sourceware.org \
    --to=xianmiao@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).