From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 62068385840C; Mon, 9 Oct 2023 09:05:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62068385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696842336; bh=5KI6Hj/kAjDlpQPjasLYJRcnvLyEazFxgScpeq89LK8=; h=From:To:Subject:Date:From; b=sdsq5hWdf6rldqCR1VYLxLHto+Qu8XdFahS896tTsaCxQJaXLwcTYftl9qDkopIqd vESxHzv5rlmMhPLX5KZKXGEckrrKPFc2q4Y6fFoGrsL2u0Art+4IosmLv7dbknsihj Utn75ieUmYUEiP9OgcdF5GwtmazM0ks465jeIhLE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111732] New: genmatch missed optimization Date: Mon, 09 Oct 2023 09:05:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111732 Bug ID: 111732 Summary: genmatch missed optimization Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- For (for coss (BUILT_IN_COS BUILT_IN_COSF BUILT_IN_COSL) (for sins (BUILT_IN_SIN BUILT_IN_SINF BUILT_IN_SINL) (simplify (abs (sins (coss @0))) @0))) the cross product could be code generated more efficiently when we'd delay for substitution but we don't, because it's only implemented for (match ...) and not (simplify ...). Specifically handling ordering correctly is tricky (match is unordered). My original idea was to delay for lowering to decision tree insertion time (split upon a "conflict" with another pattern).=