From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 049343858439 for ; Tue, 8 Aug 2023 17:46:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 049343858439 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-x629.google.com with SMTP id d9443c01a7336-1bc8045e09dso7505145ad.0 for ; Tue, 08 Aug 2023 10:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691516815; x=1692121615; 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=GXZpgAfefzf7VW2iehZXw4MV81aQN4G719+ibqnug6Q=; b=heVLIKWxWVXiICDorEODhZ35el9U+gtSwb6cS9hNUI6VrVgCdyt9o8GCwuJbu0i8M8 G75KTr4HSbaG6H/7Z7MbY/ennaPTvSGLiCJi0woK+xMG5teDwQCTUmmzTgWWsmcWQOrZ kIoMKzz0H4yo1flt2Q1xE8ZmxvXPCkiVTXB5izEIQ/MiXYtJQjnhnAHeunpovDN5W6yN GmFc1RD1WF4Co7X2ING11mby9BKPDfPB1/caNfw4/Ir2ot3bm398vdQdbXJQp/NDMByv 1j7xgHdW5wSMXJu3Ive+MEMqAiyTa1Xl/HNBTbq9pLE6XqOH2FraIDS55XJe709cxFhc 7ifA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691516815; x=1692121615; 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=GXZpgAfefzf7VW2iehZXw4MV81aQN4G719+ibqnug6Q=; b=W6BLw5jVeWi4i/BsrtHdgeA6CE5dyoIk+dfQxH/PotJys7ggZDfc34TZ+aiaUfFFlC J7hx82+KaAKuHWc2nxC0hCrUkaxWCL7R/iZQrTrNVRUEyayYQHGBeXD7mvBVJxeQfz/v UnH2OF+IFdlvic19ECZ0ABhoHAxJgT7YaLqOGTO0+6Gx77zgWUyK7//BebEvhHoCG1FL UGbe2GAFTN6OYwq3Sf94vZdyfqHgkPqRY1XdvhWIgkryjuAm0iasuLYRXma3oQdUTYGR DZdgqH9y2HiuwFMRo1Kqgo/8y06C5Q/eqVix4hwSxciCvp3CcXQNU/0NQpEOyRvXBDZl t/2g== X-Gm-Message-State: AOJu0YyXbG316mhEq//BdJClP2Y5r5Tu9P7v/h8n35KlbTEr5iby3XmK S/9Tm/rdMoK0Z6TKatxowDKycs49cZo= X-Google-Smtp-Source: AGHT+IEkqd2aIGJ7uMkhPD3YYp9Xe3fFJJzngyB7sLYQdjqDhwX9QTu8kKUMEXQZgHRen/qsZzIjwg== X-Received: by 2002:a17:902:ed93:b0:1ae:50cc:455 with SMTP id e19-20020a170902ed9300b001ae50cc0455mr371887plj.39.1691516814779; Tue, 08 Aug 2023 10:46:54 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id s21-20020a170902989500b001aaf2e8b1eesm9308017plp.248.2023.08.08.10.46.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Aug 2023 10:46:54 -0700 (PDT) Message-ID: <0ecc3144-c00e-6964-0bb1-b4102cfca8f0@gmail.com> Date: Tue, 8 Aug 2023 11:46:53 -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 :-) :-) That's even simpler than the one I just reduced. But I can see the same basic structure in my reduced case. I'll take it from here. I mucked something up, so I feel I ought to fix it. jeff