What's the matter with paradoxical subregs of memory? So, as far as I understand, Recog refuses to match them unless they are explicitly expressed as a pattern. On the other hand, Combine does not know that they are "outlawed" and happily generates them.
This happens sometimes with some new patterns for s390x for the RISBG instruction, which does complex operations on registers. As it's beneficial to allow memory operands before reload, paradoxical subregs of memory are sometimes combined from such patterns, for example (set (reg:DI 68) (and:DI (subreg:DI (lshiftrt:SI (reg:SI 67 [ *f_5(D) ]) (const_int 8 [0x8])) 0) (const_int 16777215 [0xffffff]))) + (set (reg/i:DI 2 %r2) (and:DI (reg:DI 68) (const_int 1 [0x1]))) = (set (reg/i:DI 2 %r2) (and:DI (subreg:DI (mem:QI (plus:DI (reg:DI 2 %r2 [ f ]) ^^^^^^^^^^^^^^^^^ (const_int 2 [0x2])) [1 *f_5(D)+2 S1 A16]) 0) (const_int 1 [0x1]))) Which doesn't match because of the paradoxical subreg of memory (I think). Wouldn't it be better to allow that inside combine, then ann a pass right after it that forces a reaload into a pseudo for such memory references (for the targets that don't want them)? (Not sure if theat would result in a noticeable gain or not.) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany