diff mbox series

[07/44] RISC-V: Use `nullptr' in `riscv_expand_conditional_move'

Message ID alpine.DEB.2.20.2311171447330.5892@tpp.orcam.me.uk
State New
Headers show
Series RISC-V: Various if-conversion fixes and improvements | expand

Commit Message

Maciej W. Rozycki Nov. 19, 2023, 5:36 a.m. UTC
Use `nullptr' for consistency rather than 0 to initialize `invert_ptr'.

	gcc/
	* config/riscv/riscv.cc (riscv_expand_conditional_move): Use 
	`nullptr' rather than 0 to initialize a pointer.
---
 gcc/config/riscv/riscv.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

gcc-riscv-expand-conditional-move-nullptr.diff

Comments

Kito Cheng Nov. 19, 2023, 5:53 a.m. UTC | #1
LGTM

On Sun, Nov 19, 2023 at 1:37 PM Maciej W. Rozycki <macro@embecosm.com> wrote:
>
> Use `nullptr' for consistency rather than 0 to initialize `invert_ptr'.
>
>         gcc/
>         * config/riscv/riscv.cc (riscv_expand_conditional_move): Use
>         `nullptr' rather than 0 to initialize a pointer.
> ---
>  gcc/config/riscv/riscv.cc |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> gcc-riscv-expand-conditional-move-nullptr.diff
> Index: gcc/gcc/config/riscv/riscv.cc
> ===================================================================
> --- gcc.orig/gcc/config/riscv/riscv.cc
> +++ gcc/gcc/config/riscv/riscv.cc
> @@ -4024,7 +4024,7 @@ riscv_expand_conditional_move (rtx dest,
>        if (!equality_operator (op, VOIDmode) || op1 != CONST0_RTX (mode))
>         {
>           enum rtx_code new_code = NE;
> -         bool *invert_ptr = 0;
> +         bool *invert_ptr = nullptr;
>           bool invert = false;
>
>           if (code == LE || code == GE)
diff mbox series

Patch

Index: gcc/gcc/config/riscv/riscv.cc
===================================================================
--- gcc.orig/gcc/config/riscv/riscv.cc
+++ gcc/gcc/config/riscv/riscv.cc
@@ -4024,7 +4024,7 @@  riscv_expand_conditional_move (rtx dest,
       if (!equality_operator (op, VOIDmode) || op1 != CONST0_RTX (mode))
 	{
 	  enum rtx_code new_code = NE;
-	  bool *invert_ptr = 0;
+	  bool *invert_ptr = nullptr;
 	  bool invert = false;
 
 	  if (code == LE || code == GE)