public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dimitar at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106562] PRU: Inefficient code for zero check of 64-bit (boolean) AND result Date: Wed, 05 Oct 2022 18:11:23 +0000 [thread overview] Message-ID: <bug-106562-4-KWI8Uu2Jx7@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106562-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106562 --- Comment #2 from Dimitar Dimitrov <dimitar at gcc dot gnu.org> --- With cbranchdi4 defined, the generated code is now 10 instructions: test: qbne .L5, r15, 0 qbeq .L4, r14, 0 .L5: rsb r0, r16, 0 rsc r1, r17, 0 or r0, r0, r16 or r1, r1, r17 lsr r14, r1, 31 ret .L4: ldi r14, 0 ret Defining BRANCH_COST=0, as avr backend does, shrinks the above to only 7 instructions.
next prev parent reply other threads:[~2022-10-05 18:11 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-08 19:41 [Bug target/106562] New: PRU: Inefficient code for zero check of 64-bit " dimitar at gcc dot gnu.org 2022-08-08 19:42 ` [Bug target/106562] " dimitar at gcc dot gnu.org 2022-09-18 18:04 ` [Bug target/106562] PRU: Inefficient code for zero check of 64-bit (boolean) " dimitar at gcc dot gnu.org 2022-10-05 18:11 ` dimitar at gcc dot gnu.org [this message] 2022-10-09 11:39 ` cvs-commit at gcc dot gnu.org 2023-06-07 19:02 ` dimitar at gcc dot gnu.org 2023-06-07 19:26 ` pinskia at gcc dot gnu.org 2023-08-29 19:38 ` dimitar at gcc dot gnu.org 2023-08-30 19:05 ` cvs-commit at gcc dot gnu.org 2023-08-30 20:13 ` dimitar at gcc dot gnu.org
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-106562-4-KWI8Uu2Jx7@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).