From patchwork Fri Sep 29 22:53:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jivan Hakobyan X-Patchwork-Id: 146810 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp85183vqb; Fri, 29 Sep 2023 15:54:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHVm3waM165Pf558+EEUnozfvjz8BDaLNl0gzNlVBMH2GtJkSvrW+F/45E2Jg6KWdf/W8lw X-Received: by 2002:a17:907:7626:b0:9a5:c9a4:ba19 with SMTP id jy6-20020a170907762600b009a5c9a4ba19mr4747810ejc.47.1696028055756; Fri, 29 Sep 2023 15:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696028055; cv=none; d=google.com; s=arc-20160816; b=YVjHaex/dxFUCW/Gi8qhzFLRYM5RrgxQE/DxzM2L5QJdjt8/rm4IlX4j/HZ5DFyy9A pChkkT3DgMFmFjzz8O5JM3iTyIi8G+RkLD6qMQqzjGxsObxz+AwDM2vGX9oZ87PVC11X UpuZo5S87kymxIO763b5cS4Hwo0euQ8yqhK4mvxAgETeBcR/lLVSsRovb8SPf11X9S0W NWOPhth9k80/JdqcJ74+orqc3vjqM4G7zudTKIEpJeI7jjs2qK4j8js1MN/scvOQw0C2 hZ6PE9jIuUBQXRlDU9fxAJpTzFDDgRBGtIxLDAKby/TNwBEiGmey3qc0iWtKePlCvtfZ MrRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:subject:message-id:date:from :mime-version:dkim-signature:dmarc-filter:delivered-to; bh=lJe3gSk4TWYWFAVDgylLZdFpx3WU7W36PxJarJuXkiw=; fh=SRv+JhwgQmirAPC9eRKoPSsTjSYlw+PHt8BGbgzp1U4=; b=AJobyVADcJsfFb6xc5n+mGVIOUrbHjkx2IfOEuf2gLORllBxMtSWJQINCefHWht9JZ yx4QiBHEVziKI9z/5NjyF3V80s1HTvHeVDY3TEuQnYQ9rjM0QCi0U65o7gFnEmof0biH P/ISbzAc51F8i+Nsm7zWBSRw+0iLQTiCrYmTtUHToYPNfWuscvWMayjt75Cz79x/jFG0 LeiY+8GKEbxuL/Yt8bCgGfXP2WwYMR8SWOoTeTAAKLpgAHKedgrN2UsQ0CsDRVuMvfbX jKJ3CSEo296w8UNORPQaTDi6AAk2O7Qx4mE/cq1MeaFAI3oLE+kdOtCK54p5Ar6UsWWV Vkqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=RrDyMorb; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id oy2-20020a170907104200b00992d6fae2bfsi16389181ejb.953.2023.09.29.15.54.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 15:54:15 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=RrDyMorb; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0765F3831E0E for ; Fri, 29 Sep 2023 22:54:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id AD2053858D32 for ; Fri, 29 Sep 2023 22:53:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD2053858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-578b4981526so9486378a12.0 for ; Fri, 29 Sep 2023 15:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696028020; x=1696632820; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=7IqCVTSeJboMQGAJx4yPbfmntYqfaQxVWZAePioYZ+Q=; b=RrDyMorbF2FY5v6/hU3d7oQODN6JPd1zUALwb/+ZBVWV1cmkVQmwpIMQuzMI4QyruL nQ8NW75+hPJak0D2p/lZM8O0P85DwB43Si7CxmI8pCuX8qGyndjb8kbEicLLHKYX1Utj wze6rVXT+aT2A4MfzqCcKebM07EG9Ui/2nHZw4msaIOo12e/uLvf2Fxc9bYEZjdBpTSL pUyx971bac7gHye59QB7yPehLKBJg8aKIyIFQu/EuzLmWFBGV0YUfnvPt0jvQcBRu4lZ 3cdPIzyeaFJnCG9W5ze3oeeYHMbdz3wdligILaAlZNTgFT3eYRXbeLqCUF6IbXUK9g56 SeqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696028020; x=1696632820; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7IqCVTSeJboMQGAJx4yPbfmntYqfaQxVWZAePioYZ+Q=; b=gGd5YMvZrkMPM2tirxdq2gjgsqljFwGdI9Du002ih/ArgmOpkJqWxzrePxscFtQWbm AYzYeJCFpFCAiozIoEJyo0Yw85ox12ZTnaWPVW6xKtUMSLrzHvohfXfwCS3v3YRzBhwr +2+G3+c/Jy0Xg/R3qMPnOtR4MYw0aX8Gv+MWwJL4bJOLuAQTTDkibovmoF3eQKmzddF5 AuaCLa0o+I37JzWK0ekNVN3UsXUS8j0Uqf2hCpLPc0HEsSXAg6WcATF3C6KQp+W0xjpD 5oerAQzBiIorqlicwRAGoN1igohF3KgWtnVCIVOXjuFW0qVQ+GleWHveYkRoIImvD9Vb H46g== X-Gm-Message-State: AOJu0Ywf/t2EJEYxvBEW4zjbFzoDzeQl8eyrA2ogN7jjqAw4qjJTL7Mp EfiORTUOY/8tCjZQdwF4CNcXsJooB/jJ0Do3lg5x3E2aTyhq8A== X-Received: by 2002:a17:90b:3908:b0:274:a5a6:120b with SMTP id ob8-20020a17090b390800b00274a5a6120bmr4993961pjb.36.1696028020024; Fri, 29 Sep 2023 15:53:40 -0700 (PDT) MIME-Version: 1.0 From: Jivan Hakobyan Date: Sat, 30 Sep 2023 02:53:23 +0400 Message-ID: Subject: RISC-V: Add type attribute in *_not_const pattern To: GCC Patches , Jeff Law X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778414314482186592 X-GMAIL-MSGID: 1778414314482186592 After f088b768d01a commit riscv_sched_variable_issue function requires that all insns should have a type attribute. When I sent my previous patch there was no such limitation. Currently, I have regressions on my tests. This patch fixes them. gcc/ChangeLog: * config/riscv/bitmanip.md (*_not_const): Added type attribute diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index 977be350ce3..f890280c295 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -225,7 +225,9 @@ (define_insn_and_split "*_not_const" "#" "&& reload_completed" [(set (match_dup 3) (match_dup 2)) - (set (match_dup 0) (bitmanip_bitwise:X (not:X (match_dup 1)) (match_dup 3)))]) + (set (match_dup 0) (bitmanip_bitwise:X (not:X (match_dup 1)) (match_dup 3)))] + "" + [(set_attr "type" "bitmanip")]) ;; '(a >= 0) ? b : 0' is emitted branchless (from if-conversion). Without a ;; bit of extra help for combine (i.e., the below split), we end up emitting