From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D9DD385DC0C; Fri, 21 Jul 2023 23:32:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D9DD385DC0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689982378; bh=SkEW1Xqu1qMDPvhMfscdvahUmiiFTe/dcRjdj7mO3UY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=btllHlgLCRUsd+84v0sgshsecN3DwSYaQzLy16irC0v68Y3Wp+be8h07Yoa2Snz1/ KHW8tkdbfLPQAb1025GPT9db9QuaYm914L57VX5SUwkwcMmOqj2VTVyKf+yj1bowzX ffWXVqhv+9IUXZnNjR9QcLH9YZ97YRv1i8F5y3ZA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/53100] Optimize __int128 with range information Date: Fri, 21 Jul 2023 23:32:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53100 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2021-08-06 00:00:00 |2023-7-21 --- Comment #5 from Andrew Pinski --- (simplify (plus (convert @0) (convert @1)) (if (INTEGRAL_TYPE (type) && types_match (TREE_TYPE (@0), TREE_TYPE (@1)) && element_precision (TREE_TYPE (@0)) < element_precision (type)) (with { type ntype =3D find_next_best_type (TREE_TYPE (@0)); } (if (ntype && !types_match (ntype, type) && element_precision (ntype) < element_precision (type)) (convert (plus (convert:ntype @0) (convert:ntype @1))) ) ) ) Where find_next_best_type checks int, long, long long types ...=