https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125780
--- Comment #3 from Stefan Schulze Frielinghaus <stefansf at gcc dot gnu.org> --- Of course it happens to fail on trunk for every mode because there is no reloading in case of a live hard register. Though, even if you reload, in some modes you run out of registers, i.e., the example with reloading for HI mode compiles fine and fails for SI mode. Some guidance regarding spilling to reg or mem is needed here. Note, this will work for those simple examples but if naively implemented, in more complex examples, could lead to many reloads/spills. I haven't convinced myself that this is the way to go in case of more complex examples, although it might be okayish as a first step.
