From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id BEBA63858D3C for ; Wed, 29 Nov 2023 12:25:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEBA63858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BEBA63858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701260754; cv=none; b=JRYihwgusA5MMi6/XXNhzssy1+vdG7ydBRGLP8Xc5k27tFRPZ3lYB9hzmaARevyhF9u4gSuOC80Tke5HqgsFVmQT/mcceR4tEDm3ciLqTGz3/xsLpIkzdhLnzeujW1JKDNHutqy/0OQSCNVKZbJPKTbEzrw31dW9uXl1qHuCndc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701260754; c=relaxed/simple; bh=B/rIWf1WBiCPQbe+cD3Li85RfzCCh0Urjt2h4kKorFo=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=W/N3Fx2PjnKUlzRDtCij4daTYe0gH+gN17yrAJaQrQ0zcjYKcNgDukQVYOfVFkCtEeLda6z+K+nxKhQbnNXhU38V8DmWtZtINt6yGYJvwglkb/CJjO0vdQW5078G/PgQ/AB20HXS38Qh/3lU3ioQnMaShuBE5zJmeQfRkFlP9BU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50bbb4de875so2433689e87.0 for ; Wed, 29 Nov 2023 04:25:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701260749; x=1701865549; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xbPjYBCIJqaHsJP0u5ua9toT4RQvMGt990BjhhGW/uM=; b=R2MOKjwIOMnyVIRCf7WeYto5Qhjh9xrGd6EEVGP71r8P2TwvIzxMi7BbrioLMEjsWc x3jADrIWsUnxdO1vs1EYGLvPdKuBUstmEIxXpbYpA3d1Szt6knDqOz4CyCmk0jD+rVlT gwcfogPtRCP0nw2+BIZWmPA6tmYCaA1//XvKxTL/qcoM80WarINd1ndWXToAyRtVbgoX LSILQ+YB5fPBxIkqALby3qVHCsKUbdyp+rw1/apwFoXNQeeHcOpxybkOtsBdfQL0gQzt GlQHKGhEj9saKRP5Vox6mgsjE3UO/ZjgdaNXnECv/Vgg2Ve8Idu7XQPileAcfYGVMkQ3 HGgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701260749; x=1701865549; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xbPjYBCIJqaHsJP0u5ua9toT4RQvMGt990BjhhGW/uM=; b=eEeBlojFBkBf7rat4pr2b47e6pOLh6EX/GqKGPy9iD8zB5qnVPOCJbG+SWmInpuFFt bYFe1dXIb5cDRwKGtKV24htQ62RRsx7lqjyCaQ4FEHsbpPUyuUfqTReagxTetYqNVHVG wR0L26H8o8avgIdDWswfw/8rYRR+70mUN2dg17swYlBfvcKCKsWfbEGQPZ6B8qqsFiNb O4sEh8CHkHLJK8P+uoVFgT9mcYdtPmHMSIJT68dh7SXwbqOjuFTuHRuN7oxK6+Ec7GVX Gzc8sk/CCgRLbUvQ54SaIaxBbumDV16UTyybbj4lG0PGaArMsrYHuSkrBnaoUu6YD52g lM5A== X-Gm-Message-State: AOJu0YxM58QYH3qol6ytOu3lo2Mivwy5MdLCGqwS68TCW8JXlhm5E1cX AA87SAfiTQ32ZopN0wAKl4Rlsbw+vw4fhs2S4ec= X-Google-Smtp-Source: AGHT+IFGRIDiQNQFTvzkmWTdZ9n0M1AyFApTmVhgOPUhJiCU3A7cp/fulM80EKNCrfR+XIiHyk8O2uXMvVKNjkVBaxs= X-Received: by 2002:a19:7017:0:b0:50b:ba9f:fab7 with SMTP id h23-20020a197017000000b0050bba9ffab7mr3046945lfc.30.1701260748830; Wed, 29 Nov 2023 04:25:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Wed, 29 Nov 2023 13:25:36 +0100 Message-ID: Subject: Re: [PATCH] combine: Fix ICE in try_combine on pr112494.c [PR112560] To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,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 Wed, Nov 29, 2023 at 10:35=E2=80=AFAM Uros Bizjak wr= ote: > > The compiler, configured with --enable-checking=3Dyes,rtl,extra ICEs with= : > > internal compiler error: RTL check: expected elt 0 type 'e' or 'u', > have 'E' (rtx unspec) in try_combine, at combine.cc:3237 > > This is > > 3236 /* Just replace the CC reg with a new mode. */ > 3237 SUBST (XEXP (*cc_use_loc, 0), newpat_dest); > 3238 undobuf.other_insn =3D cc_use_insn; > > in combine.cc, where *cc_use_loc is > > (unspec:DI [ > (reg:CC 17 flags) > ] UNSPEC_PUSHFL) > > combine assumes CC must be used inside of a comparison and uses XEXP (...= , 0) > without checking on the RTX type of the argument. > > Skip the modification of CC-using operation if *cc_use_loc is not COMPARI= SON_P. > > PR middle-end/112560 > > gcc/ChangeLog: > > * combine.cc (try_combine): Skip the modification of CC-using > operation if *cc_use_loc is not COMPARISON_P. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > OK for master? Don't we need to stop the attempt to combine when we cannot handle a use? Simply not adjusting another use doesn't look correct, does it? Richard. > > Uros.