https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122665
--- Comment #7 from Roger Sayle <roger at nextmovesoftware dot com> --- Doh! I've misremembered, Richard Sandiford pointed out the example in https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579900.html which allowed Segher to (temporarily) win an argument on misuse/abuse of SUBREG by various backends. GCC's current documentation https://gcc.gnu.org/onlinedocs/gccint/Regs-and-Memory.html#index-subreg implies that SUBREG's first operand is either REG or a MEM, Richard and Segher corrected me that backends rarely pay attention to the documentation. My solution was to introduce RTX codes, so that for this particular use-case, backends didn't need to misuse SUBREG (or opaque UNSPEC, or TRUNCATE). https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580508.html So Segher/rs6000 is partially responsible/motivational for {s,u}mul_highpart.
