https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121302

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-07-29
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
index 125048da181..cce08f4844b 100644
--- a/gcc/simplify-rtx.cc
+++ b/gcc/simplify-rtx.cc
@@ -8416,7 +8416,7 @@ simplify_context::simplify_subreg (machine_mode
outermode, rtx op,
       && (GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) ==
XOR)
       && CONSTANT_P (XEXP (op, 1)))
     {
-      rtx op1_subreg = simplify_subreg (outermode, XEXP (op, 1), innermode,
0);
+      rtx op1_subreg = simplify_subreg (outermode, XEXP (op, 1), innermode,
byte);
       if (op1_subreg == CONSTM1_RTX (outermode))
        {
          if (GET_CODE (op) == IOR)
@@ -8424,13 +8424,13 @@ simplify_context::simplify_subreg (machine_mode
outermode, rtx op,
          rtx op0 = XEXP (op, 0);
          if (GET_CODE (op) == XOR)
            op0 = simplify_gen_unary (NOT, innermode, op0, innermode);
-         return simplify_gen_subreg (outermode, op0, innermode, 0);
+         return simplify_gen_subreg (outermode, op0, innermode, byte);
        }

       if (op1_subreg == CONST0_RTX (outermode))
        return (GET_CODE (op) == AND
                ? op1_subreg
-               : simplify_gen_subreg (outermode, XEXP (op, 0), innermode, 0));
+               : simplify_gen_subreg (outermode, XEXP (op, 0), innermode,
byte));
     }

   return NULL_RTX;
```

This is the obvious fix.

Reply via email to