public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Fix `mode' usage in `riscv_expand_conditional_move'
Date: Wed, 22 Nov 2023 05:09:17 +0000 (GMT)	[thread overview]
Message-ID: <20231122050917.CF2FD3858C2F@sourceware.org> (raw)

https://gcc.gnu.org/g:b348a0aba90a3d03167392f7f8c0a9142be517a7

commit b348a0aba90a3d03167392f7f8c0a9142be517a7
Author: Maciej W. Rozycki <macro@embecosm.com>
Date:   Wed Nov 22 01:18:24 2023 +0000

    RISC-V: Fix `mode' usage in `riscv_expand_conditional_move'
    
    In `riscv_expand_conditional_move' `mode' is initialized right away from
    `GET_MODE (dest)', so remove needless references that refrain from using
    the local variable.
    
            gcc/
            * config/riscv/riscv.cc (riscv_expand_conditional_move): Use
            `mode' for `GET_MODE (dest)' throughout.
    
    (cherry picked from commit 04c9c27c6f34a1ce1cd4900ccc8dc2521852e8e6)

Diff:
---
 gcc/config/riscv/riscv.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 453c5f17196..d37ffb307c7 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -4028,8 +4028,8 @@ riscv_expand_conditional_move (rtx dest, rtx op, rtx cons, rtx alt)
 	 arm of the conditional move.  That allows us to support more
 	 cases for extensions which are more general than SFB.  But
 	 does mean we need to force CONS into a register at this point.  */
-      cons = force_reg (GET_MODE (dest), cons);
-      emit_insn (gen_rtx_SET (dest, gen_rtx_IF_THEN_ELSE (GET_MODE (dest),
+      cons = force_reg (mode, cons);
+      emit_insn (gen_rtx_SET (dest, gen_rtx_IF_THEN_ELSE (mode,
 							  cond, cons, alt)));
       return true;
     }

                 reply	other threads:[~2023-11-22  5:09 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=20231122050917.CF2FD3858C2F@sourceware.org \
    --to=law@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: link
Be 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).