From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 2300D3858D20 for ; Tue, 8 Aug 2023 21:41:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2300D3858D20 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-pl1-x62b.google.com with SMTP id d9443c01a7336-1bc3bec2c95so2223675ad.0 for ; Tue, 08 Aug 2023 14:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691530918; x=1692135718; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NtGTdHBwz4TsgX3kr+VLo10+TTZ84r8uYDg8QNdiul8=; b=neBpo8HVCWx23NfASSIuSysaMwuhZp9d2XHm7MZE/kSBTL9OZ9o0741xnIJ0rj+XTK zwjv7K6cDN+HPT/X7UWVXj7/IdOYl7tp0MeUMcFo6a0eE6f0yVofLmdYtnxMIWupEr2t 4XRliBv3g2A5FVC849a9/hu6REfMFoIuPOc2FeWwYgdTjNeUrJg/4PfU0aIIZZlHNHIi MEyZN5O1yAHfl838oG4hUjt8cJ+0uOtjAyhSBo4BGwYD+vjNU9SIKC9oCP0rTcosgxLM Jzd1CQrfPtIx2goVTXpDE3ZXayYtmStenVDRhllCBBwhXSCPVLhbvWXwOrhMGfG4RB6K phRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691530918; x=1692135718; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NtGTdHBwz4TsgX3kr+VLo10+TTZ84r8uYDg8QNdiul8=; b=KW2lzS+Q05r7KNjFKB34XrZt7XVvjukp4V0V71mVUTfOWGjm1KZML/bs7JrU+jscXi QfmtBfSiVgyYlnUxVc7jRHsBWme4NJ2M98hGiKlRlFrglCqfCA2nXcarIWCS9hUEAR6B CfjBYq7zbipn9tidAGUNzFZG30nT0xM/4tvMP3aIep7ygr4+ZkYmrikL4j5bz6REIM9Q U+Bh4itwlcS5LJfjtmhcUle5urqEa/2oL8DDefs9/QddTsZagFJjhMJRHs8oRZUfFJpV u5DVW5bKridGOsZFbfxccMaIzA/9tofZVpVkrFPeWWkHB39mT4fLC/0vC3TcrR2i9VqY BFRg== X-Gm-Message-State: AOJu0YwJST6/kwXLcgVzwiBsLnVZTLufI7d9Qbkk7DdgC1tklP/CP/P0 y0SFbr8KEUG2n22sih0+7go= X-Google-Smtp-Source: AGHT+IEa8lDqmgyR6nwRS06trxms7QpSc4uB/fIJYxXbmFv86mMhmT6QHVDnUncP6IM6Cm1V43TtGA== X-Received: by 2002:a17:902:654d:b0:1bc:671d:6d2d with SMTP id d13-20020a170902654d00b001bc671d6d2dmr8518850pln.21.1691530917965; Tue, 08 Aug 2023 14:41:57 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id z11-20020a170902ee0b00b001bb7a736b4csm9534184plb.77.2023.08.08.14.41.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Aug 2023 14:41:57 -0700 (PDT) Message-ID: Date: Tue, 8 Aug 2023 15:41:56 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: RV64 Zicond ICE (was Re: [committed][RISC-V]Don't reject constants in cmov condition) Content-Language: en-US To: Vineet Gupta , Jeff Law , "gcc-patches@gcc.gnu.org" References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 8/8/23 11:21, Vineet Gupta wrote: > Hi Jeff, > > On 8/7/23 13:36, Jeff Law wrote: >> >> This test is too aggressive.  Constants have VOIDmode, so we need to >> let the through this phase of conditional move support. >> >> Fixes several missed conditional moves with the trunk. >> >> Committed to the trunk, > > As discussed this morning, this triggers an ICE when building glibc for > rv64_zicond > > programs/ld-ctype.c:3977:1: error: unrecognizable insn: >  3977 | } >       | ^ > (insn 238 237 239 18 (set (reg:SI 727) >         (if_then_else:SI (eq:SI (reg:SI 725) >                 (const_int 0 [0])) >             (const_int 0 [0]) >             (reg:SI 721))) -1 >      (nil)) > during RTL pass: vregs > programs/ld-ctype.c:3977:1: internal compiler error: in extract_insn, at > recog.cc:2791 > 0x885de7 _fatal_insn(char const*, rtx_def const*, char const*, int, char > const*)     ../.././gcc/gcc/rtl-error.cc:108 > 0x885e09 _fatal_insn_not_found(rtx_def const*, char const*, int, char > const*)    ../.././gcc/gcc/rtl-error.cc:116 > 0x8846f9 extract_insn(rtx_insn*)    ../.././gcc/gcc/recog.cc:2791 > 0xcf77ae instantiate_virtual_regs_in_insn ../.././gcc/gcc/function.cc:1610 > 0xcf77ae instantiate_virtual_regs ../.././gcc/gcc/function.cc:1983 > 0xcf77ae execute    ../.././gcc/gcc/function.cc:2030 > > Here's the reduced reproducer. > > a, c; > long b; > d() { >   for (;;) >     if (a & (b < 8 ?: 1 << b)) >       c = 1; > } > > I'll try to muster a fix :-) Should be fixed now, with a regression test in the suite. Thanks, jeff