public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112454] csinc (csel is though) is not being used when there is matches twice Date: Mon, 27 Nov 2023 23:09:52 +0000 [thread overview] Message-ID: <bug-112454-4-9HKeqCA7vy@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112454-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112454 --- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>: https://gcc.gnu.org/g:d29d27bde5df89e5357e0a33a71bb49125bd1655 commit r14-5893-gd29d27bde5df89e5357e0a33a71bb49125bd1655 Author: Andrew Pinski <quic_apinski@quicinc.com> Date: Sun Nov 26 23:25:51 2023 +0000 aarch64: Improve cost of `a ? {-,}1 : b` While looking into PR 112454, I found the cost for `(if_then_else (cmp) (const_int 1) (reg))` was being recorded as 8 (or `COSTS_N_INSNS (2)`) but it should have been 4 (or `COSTS_N_INSNS (1)`). This improves the cost by not adding the cost of `(const_int 1)` to the total cost. It does not does not fully fix PR 112454 as that requires other changes to forwprop the `(const_int 1)` earlier than combine. Though we do fix the loop case where the constant was only used once. Bootstrapped and tested on aarch64-linux-gnu with no regressions. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_if_then_else_costs): Handle csinv/csinc case of 1/-1. gcc/testsuite/ChangeLog: * gcc.target/aarch64/csinc-3.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
prev parent reply other threads:[~2023-11-27 23:09 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-09 6:54 [Bug target/112454] New: " pinskia at gcc dot gnu.org 2023-11-09 17:57 ` [Bug target/112454] " pinskia at gcc dot gnu.org 2023-11-18 6:48 ` pinskia at gcc dot gnu.org 2023-11-18 6:56 ` pinskia at gcc dot gnu.org 2023-11-26 23:52 ` pinskia at gcc dot gnu.org 2023-11-27 23:09 ` cvs-commit at gcc dot gnu.org [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-112454-4-9HKeqCA7vy@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).