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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-09-11
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
      else if (SCALAR_INT_MODE_P (GET_MODE (op0))
               && optimize >= 2
               && SCALAR_INT_MODE_P (mode)
               && (GET_MODE_SIZE (as_a <scalar_int_mode> (mode))
                   > GET_MODE_SIZE (as_a <scalar_int_mode> (GET_MODE (op0))))
               && get_range_pos_neg (treeop0,
                                     currently_expanding_gimple_stmt) == 1)
```

Most likely this needs a !POINTER_TYPE_P check for treeop0.
Or get_range_pos_neg needs to return 3 for POINTER_TYPE_P types.

This only shows up on targets where there are 2 different pointer type modes.
Which is why it shows up on s390 with this testcase.

Reply via email to