fwprop: Allow (subreg (mem)) simplifications
Suppose we have:
(set (reg/v:TF 63) (mem/c:TF (reg/v:DI 62)))
(set (reg:FPRX2 66) (subreg:FPRX2 (reg/v:TF 63) 0))
It is clearly profitable to propagate the first insn into the second
one and get:
(set (reg:FPRX2 66) (mem/c:FPRX2 (reg/v:DI 62)))
fwprop actually manages to perform this, but doesn't think the result is
worth it, which results in unnecessary store/load sequences on s390.
Improve the situation by classifying SUBREG -> MEM changes as
profitable.
gcc/ChangeLog:
2021-01-15 Ilya Leoshkevich <iii@linux.ibm.com>
* fwprop.c (fwprop_propagation::classify_result): Allow
(subreg (mem)) simplifications.