public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alan Modra <amodra@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-3419] [RS6000] Count rldimi constant insns Date: Thu, 24 Sep 2020 03:23:11 +0000 (GMT) [thread overview] Message-ID: <20200924032311.CC13439518A8@sourceware.org> (raw) https://gcc.gnu.org/g:0075cea0fdccc2efb781f4f3c924007de37a3417 commit r11-3419-g0075cea0fdccc2efb781f4f3c924007de37a3417 Author: Alan Modra <amodra@gmail.com> Date: Wed Apr 1 13:34:47 2020 +1030 [RS6000] Count rldimi constant insns rldimi is generated by rs6000_emit_set_long_const when the high and low 32 bits of a 64-bit constant are equal. PR target/93012 * config/rs6000/rs6000.c (num_insns_constant_gpr): Count rldimi constants correctly. Diff: --- gcc/config/rs6000/rs6000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6f204ca202a..5f4e2927a21 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5731,7 +5731,7 @@ direct_return (void) /* Helper for num_insns_constant. Calculate number of instructions to load VALUE to a single gpr using combinations of addi, addis, ori, - oris and sldi instructions. */ + oris, sldi and rldimi instructions. */ static int num_insns_constant_gpr (HOST_WIDE_INT value) @@ -5759,7 +5759,7 @@ num_insns_constant_gpr (HOST_WIDE_INT value) high >>= 1; - if (low == 0) + if (low == 0 || low == high) return num_insns_constant_gpr (high) + 1; else if (high == 0) return num_insns_constant_gpr (low) + 1;
reply other threads:[~2020-09-24 3:23 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200924032311.CC13439518A8@sourceware.org \ --to=amodra@gcc.gnu.org \ --cc=gcc-cvs@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).