public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "christophm30 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105477] New: RISC-V: Regression: Useless moves in conditional select return Date: Wed, 04 May 2022 10:46:12 +0000 [thread overview] Message-ID: <bug-105477-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105477 Bug ID: 105477 Summary: RISC-V: Regression: Useless moves in conditional select return Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: christophm30 at gmail dot com Target Milestone: --- Commit 3a7ba8fd triggers a regression so that on RISC-V two useless move instructions are generated. Test code: """ long test(long a, long b, long c) { return (!c ? a : b); } """ GCC 10.2.0, GCC 11 or upstream/master before 3a7ba8fd generates (rv64gc + -O3): test: beq a2,zero,.L2 mv a0,a1 .L2: ret Current upstream/master generates: <test>: 0: 87aa mv a5,a0 2: 852e mv a0,a1 4: e211 bnez a2,8 <.L2> 6: 853e mv a0,a5 <.L2>: 8: 8082 ret This might be an issue in the ifcvt code (in combination of the RISC-V backend) or something where the RISC-V backend needs to improve. Some context to this issue: * The mentioned change (3a7ba8fd) is not problematic at all and fixes an issue PR104960 * PR105314 reports a similar issue, that is also triggered by the same change
next reply other threads:[~2022-05-04 10:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-04 10:46 christophm30 at gmail dot com [this message] 2022-05-04 10:58 ` [Bug rtl-optimization/105477] " rguenth at gcc dot gnu.org 2022-05-09 10:17 ` christophm30 at gmail dot com
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-105477-4@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).