From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9BFC03858CD1 for ; Mon, 11 Dec 2023 14:18:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BFC03858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BFC03858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702304343; cv=none; b=ENq/PSh9klCK6/u+Fv6ZnGyLAHQIRlGATrfd27AD5wCtWIlfy8pGJU7orOOJqeHo0yNUeHkFVGFpkYV+u6E9l5qFEUeyN3yn0aWvzQGrKW6IngeuHpK7sltq9lV2UFu1mEOq1cdbk/SZ1YwO7ofV90ENmMkqG1k+T0S4UFis+xI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702304343; c=relaxed/simple; bh=PsFuhkScxHwMCiVvYmpLA0GLrcwsDXyhzPagRwyhLeQ=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=LYu5GBjMuMwJbTE+RmEAcz9YthxPDbNLgw7pb52zP2ZatusMLOuwyczH/eGGnmFW/fItyhGcYVuHUkCifAqog925axdgSAjVL1IYFMytYow47d/soUp0B/wrYjV+zMsucptwNX0zf7pW/Qy1XWrO0JRIUiCI6r+BjGcQVCup1ZY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702304336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PsFuhkScxHwMCiVvYmpLA0GLrcwsDXyhzPagRwyhLeQ=; b=ZtvvJc4FEd+A6qQA8tEVmNlkaqqPuy2m+75XP5UtcHGL4HxmYIs6ZunHLsxFUBJPrrKmxH 0qZKpc3eglF8VcTBynyQ7doilHkVtVfO4ygcSxIbLuymqpDzzpakmN8qXip/LWFKjFLjOM sdHpTts7pQ7Yv3iNf/DAwQsjceoQazY= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-53-X2nozXiNPIeUhRrctsikvg-1; Mon, 11 Dec 2023 09:18:53 -0500 X-MC-Unique: X2nozXiNPIeUhRrctsikvg-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-77f7ba27036so94024485a.1 for ; Mon, 11 Dec 2023 06:18:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702304333; x=1702909133; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PsFuhkScxHwMCiVvYmpLA0GLrcwsDXyhzPagRwyhLeQ=; b=vX1wBFhmgUr5NjOzRgysS3FPHFqbTeREj+Im7krb5vbnIPqWWih7OxqK/OziKNFIba x8QU4ZtqtfZPO8o/wNKVv/sQCZJdmEvv8dtonaPy4Sq/5hMvqr9TCqSqHjLUJjAZxIGY nq4fp7n1KP3KBSSI/5zZDU6z9SBJMc0q0zDiWrfp8NZ7o3aFECKUPffGZO7EdCkDPolZ z++34aZW4XEx2DdOqVo4EecszMY/eqApzlwSKeyezlb4oWTnZLC+HsRbTXzsuoD4TtFh n/yjcSehXCl/sIxBM4qbY28HTSxR7tSJvw4XiKS2qqRdCjocyLvlqLlaYuAXkWqBkVCS j60Q== X-Gm-Message-State: AOJu0YwSgkhrLEeWDOFGWppFTvVXUr6CTtv32EYPQHcq9k3+2kw8J3hW Mwl7HsOULmAgkAVfwf2SQD3R7UOZOXKkq8hlU+87yILNgGcVjXu3kP2GQN126sg5aGLWK/4VRcF qln1w9+bPpkvKlZFNqw== X-Received: by 2002:a05:6214:d6e:b0:67a:4835:f907 with SMTP id 14-20020a0562140d6e00b0067a4835f907mr8312318qvs.21.1702304333367; Mon, 11 Dec 2023 06:18:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEW1kYEWyqTtvzJbswKTwa41ckCJkZcfyFpFh1VvwdWDRMGmEUc2RLlxXyN1dgvynkxGmEK5g== X-Received: by 2002:a05:6214:d6e:b0:67a:4835:f907 with SMTP id 14-20020a0562140d6e00b0067a4835f907mr8312309qvs.21.1702304333111; Mon, 11 Dec 2023 06:18:53 -0800 (PST) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id u12-20020a0cf88c000000b0067a39a44ca5sm3308304qvn.77.2023.12.11.06.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 06:18:52 -0800 (PST) Message-ID: Subject: Re: [PATCH 1/2] analyzer: Remove check of unsigned_char in maybe_undo_optimize_bit_field_compare. From: David Malcolm To: Richard Biener , Andrew Pinski Cc: gcc-patches@gcc.gnu.org Date: Mon, 11 Dec 2023 09:18:51 -0500 In-Reply-To: References: <20231210195650.1772459-1-quic_apinski@quicinc.com> <20231210195650.1772459-2-quic_apinski@quicinc.com> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, 2023-12-11 at 09:04 +0100, Richard Biener wrote: > On Sun, Dec 10, 2023 at 8:57=E2=80=AFPM Andrew Pinski > wrote: > >=20 > > From: Andrew Pinski > >=20 > > The check for the type seems unnecessary and gets in the way > > sometimes. > > Also with a patch I am working on for match.pd, it causes a failure > > to happen. > > Before my patch the IR was: > > =C2=A0 _1 =3D BIT_FIELD_REF ; > > =C2=A0 _2 =3D _1 & 1; > > =C2=A0 _3 =3D _2 !=3D 0; > > =C2=A0 _4 =3D (int) _3; > > =C2=A0 __analyzer_eval (_4); > >=20 > > Where _2 was an unsigned char type. > > And After my patch we have: > > =C2=A0 _1 =3D BIT_FIELD_REF ; > > =C2=A0 _2 =3D (int) _1; > > =C2=A0 _3 =3D _2 & 1; > > =C2=A0 __analyzer_eval (_3); > >=20 > > But in this case, the BIT_AND_EXPR is in an int type. > >=20 > > OK? Bootstrapped and tested on x86_64-linux-gnu with no > > regressions. Yes... >=20 > OK (hope it's OK that I approve this). ...and yes. Dave