Increment LABEL_NUSES when using minipool_vector_label to avoid the zero
use count on minipool_vector_label.

PR target/118866
* config/arm/arm.cc (arm_reorg): Increment LABEL_NUSES when
using minipool_vector_label.

-- 
H.J.
From 91907dc6d948bf256dfa95a161af783df44b1b65 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.to...@gmail.com>
Date: Fri, 14 Feb 2025 05:25:47 +0800
Subject: [PATCH] arm: Increment LABEL_NUSES when using minipool_vector_label

Increment LABEL_NUSES when using minipool_vector_label to avoid the zero
use count on minipool_vector_label.

	PR target/118866
	* config/arm/arm.cc (arm_reorg): Increment LABEL_NUSES when
	using minipool_vector_label.

Signed-off-by: H.J. Lu <hjl.to...@gmail.com>
---
 gcc/config/arm/arm.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index a95ddf8201f..2e3ffdd2607 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -19787,6 +19787,7 @@ arm_reorg (void)
 			       gen_rtx_LABEL_REF (VOIDmode,
 						  minipool_vector_label),
 			       this_fix->minipool->offset);
+	    LABEL_NUSES (minipool_vector_label) += 1;
 	    *this_fix->loc = gen_rtx_MEM (this_fix->mode, addr);
 	  }
 
-- 
2.48.1

Reply via email to