public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] C-SKY: Fix missing operand when do spilt for cskyv2_addcc and cskyv2_addcc_invert.
@ 2022-09-06  7:17 Xianmiao Qu
  0 siblings, 0 replies; only message in thread
From: Xianmiao Qu @ 2022-09-06  7:17 UTC (permalink / raw)
  To: gcc-patches; +Cc: Xianmiao Qu

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.
---
 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]),
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-06  7:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06  7:17 [COMMITTED] C-SKY: Fix missing operand when do spilt for cskyv2_addcc and cskyv2_addcc_invert Xianmiao Qu

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