]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Fix `mode' usage in `riscv_expand_conditional_move'
authorMaciej W. Rozycki <macro@embecosm.com>
Wed, 22 Nov 2023 01:18:24 +0000 (01:18 +0000)
committerMaciej W. Rozycki <macro@embecosm.com>
Wed, 22 Nov 2023 01:18:24 +0000 (01:18 +0000)
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.

gcc/config/riscv/riscv.cc

index 453c5f17196c95fdacf1338a7bf2e58adbc7cdf4..d37ffb307c72e1926ed6084a36fb7267311dd4aa 100644 (file)
@@ -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;
     }