From patchwork Tue Sep 6 07:17:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xianmiao Qu X-Patchwork-Id: 1674547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=rrtk4wk8; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MMH3Y3MpMz1yh5 for ; Tue, 6 Sep 2022 17:25:29 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E6BF3952482 for ; Tue, 6 Sep 2022 07:25:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E6BF3952482 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662449127; bh=qHnM7z6Zw880FqxvTAmabmr/gAOgd6XzwEnRKvxmi8M=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rrtk4wk8ZLJtddbeGg1UUsMlihc/PyxbYkL0sq4feHwaQ9McVjo/yHFLDlzoiYwrX a3spkHy4cuH8HXf4QJjA7z07gGcVRsjFHBEYNll3NZMtEPQTci/ylmla8uf9L3cgvV ecglISiiYDTnGll6XDSSicQYY+S8tCyb82kl+dbY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by sourceware.org (Postfix) with ESMTPS id 5EA84385085B for ; Tue, 6 Sep 2022 07:17:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5EA84385085B X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R651e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046051; MF=cooper.qu@linux.alibaba.com; NM=1; PH=DS; RN=2; SR=0; TI=SMTPD_---0VObnmXm_1662448649; Received: from L-PF1ZESZG-1136.hz.ali.com(mailfrom:cooper.qu@linux.alibaba.com fp:SMTPD_---0VObnmXm_1662448649) by smtp.aliyun-inc.com; Tue, 06 Sep 2022 15:17:31 +0800 To: gcc-patches@gcc.gnu.org Subject: [COMMITTED] C-SKY: Fix missing operand when do spilt for cskyv2_addcc and cskyv2_addcc_invert. Date: Tue, 6 Sep 2022 15:17:21 +0800 Message-Id: <20220906071721.823-1-cooper.qu@linux.alibaba.com> X-Mailer: git-send-email 2.24.0.windows.2 MIME-Version: 1.0 X-Spam-Status: No, score=-20.4 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xianmiao Qu via Gcc-patches From: Xianmiao Qu Reply-To: Xianmiao Qu Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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]),