https://gcc.gnu.org/g:26a90c553fb445fabd6a3ba5cf9521116c43b7cc

commit r17-5121-g26a90c553fb445fabd6a3ba5cf9521116c43b7cc
Author: John David Anglin <[email protected]>
Date:   Tue Oct 13 10:04:32 2026 -0400

    hppa: Fix checking errors in pa.cc
    
    Constant pool addresses are special SYMBOL_REF references and they
    are handled by direct SYMBOL_REF checks.  So, we can remove the
    CONSTANT_POOL_ADDRESS_P checks which cause checking errors.
    
    2026-10-13  John David Anglin  <[email protected]>
    
    gcc/ChangeLog:
    
            PR target/127843
            * config/pa/pa.cc (pa_emit_move_sequence): Don't check constant
            pool address.
            (pa_legitimate_constant_p): Likewise.
            (pa_legitimate_address_p): Likewise.

Diff:
---
 gcc/config/pa/pa.cc | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc
index 86e1ee548def..5e577af67c71 100644
--- a/gcc/config/pa/pa.cc
+++ b/gcc/config/pa/pa.cc
@@ -2232,8 +2232,8 @@ pa_emit_move_sequence (rtx *operands, machine_mode mode, 
rtx scratch_reg)
   if ((mode == SFmode || mode == DFmode)
       && MEM_P (operand1)
       && (scratch_reg || can_create_pseudo_p ())
-      && (CONSTANT_POOL_ADDRESS_P (XEXP (operand1, 0))
-         || GET_CODE (XEXP (operand1, 0)) == SYMBOL_REF
+      && (GET_CODE (XEXP (operand1, 0)) == SYMBOL_REF
+         || GET_CODE (XEXP (operand1, 0)) == LABEL_REF
          || GET_CODE (XEXP (operand1, 0)) == CONST))
     {
       rtx addr = XEXP (operand1, 0);
@@ -11005,7 +11005,7 @@ pa_legitimate_constant_p (machine_mode mode, rtx x)
       && !INT_14_BITS (x))
     return false;
 
-  /* Reject naked symbolic and constant pool SF and DF mode addresses
+  /* Reject naked symbolic and constant SF and DF mode addresses
      unconditionally on 32-bit targets.  We intentionally do not unwrap
      LO_SUM expressions here, as those are valid address calculations
      for 14-bit displacement optimizations on PA 2.0.  */
@@ -11017,17 +11017,18 @@ pa_legitimate_constant_p (machine_mode mode, rtx x)
          /* Check both components of the addition for symbolic links.  */
          rtx op0 = XEXP (base, 0);
          rtx op1 = XEXP (base, 1);
-         if (GET_CODE (op0) == SYMBOL_REF || GET_CODE (op0) == LABEL_REF
-             || GET_CODE (op0) == CONST || CONSTANT_POOL_ADDRESS_P (op0)
-             || GET_CODE (op1) == SYMBOL_REF || GET_CODE (op1) == LABEL_REF
-             || GET_CODE (op1) == CONST || CONSTANT_POOL_ADDRESS_P (op1))
+         if (GET_CODE (op0) == SYMBOL_REF
+             || GET_CODE (op0) == LABEL_REF
+             || GET_CODE (op0) == CONST
+             || GET_CODE (op1) == SYMBOL_REF
+             || GET_CODE (op1) == LABEL_REF
+             || GET_CODE (op1) == CONST)
            return false;
        }
 
       if (GET_CODE (base) == SYMBOL_REF
          || GET_CODE (base) == LABEL_REF
-         || GET_CODE (base) == CONST
-         || CONSTANT_POOL_ADDRESS_P (base))
+         || GET_CODE (base) == CONST)
        return false;
     }
 
@@ -11244,8 +11245,7 @@ pa_legitimate_address_p (machine_mode mode, rtx x, bool 
strict, code_helper)
       && (mode == SFmode || mode == DFmode)
       && (GET_CODE (x) == SYMBOL_REF
          || GET_CODE (x) == LABEL_REF
-         || GET_CODE (x) == CONST
-         || CONSTANT_POOL_ADDRESS_P (x)))
+         || GET_CODE (x) == CONST))
     return false;
 
   if (GET_CODE (x) == CONST_INT && INT_5_BITS (x))

Reply via email to