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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
validate_subreg allows the paradoxical subreg even in the case of hard
register:
```
  /* Paradoxical subregs must have offset zero.  */
  if (maybe_gt (osize, isize))
    return known_eq (offset, 0U);

  /* This is a normal subreg.  Verify that the offset is representable.  */

  /* For hard registers, we already have most of these rules collected in
     subreg_offset_representable_p.  */
  if (reg && REG_P (reg) && HARD_REGISTER_P (reg))
...

So either validate_subreg needs to reject if the subreg of a hard reg is not
valid for that mode for paradoxical subreg. Or I am using
rtl_hooks.gen_lowpart_no_emit incorrectly in my patch to create a paradoxical
subreg.

Reply via email to