https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128219
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
```
trying to combine definition of r0 in:
8: ax:DI=si:DI<<0x3+di:DI
into:
10: xmm0:DF=[ax:DI]
REG_EQUIV [ax:DI]
successfully matched this instruction to *movdf_internal:
(set (reg:DF 20 xmm0 [orig:113 MEM <real(kind=8)D.18> [(real(kind=8)D.18[0:]
*)_13 clique 1 base 1] ] [113])
(mem:DF (plus:DI (mult:DI (reg:DI 4 si [orig:115 eD.4794 ] [115])
(const_int 8 [0x8]))
(reg/f:DI 5 di [orig:114 aD.4793 ] [114])) [1 MEM
<real(kind=8)D.18> [(real(kind=8)D.18[0:] *)_13 clique 1 base 1]+0 S8 A64]))
11: xmm0:DF=xmm0:DF+[ax:DI+0x8]
successfully matched this instruction to *fop_df_comm:
(set (reg:DF 20 xmm0 [orig:112 _4 ] [112])
(plus:DF (reg:DF 20 xmm0 [orig:113 MEM <real(kind=8)D.18>
[(real(kind=8)D.18[0:] *)_13 clique 1 base 1] ] [113])
(mem:DF (plus:DI (plus:DI (mult:DI (reg:DI 4 si [orig:115 eD.4794 ]
[115])
(const_int 8 [0x8]))
(reg/f:DI 5 di [orig:114 aD.4793 ] [114]))
(const_int 8 [0x8])) [1 MEM <real(kind=8)D.18>
[(real(kind=8)D.18[0:] *)_13 + 8B clique 1 base 1]+0 S8 A64])))
12: xmm0:DF=xmm0:DF+[ax:DI+0x10]
successfully matched this instruction to *fop_df_comm:
(set (reg:DF 20 xmm0 [orig:111 _7 ] [111])
(plus:DF (reg:DF 20 xmm0 [orig:112 _4 ] [112])
(mem:DF (plus:DI (plus:DI (mult:DI (reg:DI 4 si [orig:115 eD.4794 ]
[115])
(const_int 8 [0x8]))
(reg/f:DI 5 di [orig:114 aD.4793 ] [114]))
(const_int 16 [0x10])) [1 MEM <real(kind=8)D.18>
[(real(kind=8)D.18[0:] *)_13 + 16B clique 1 base 1]+0 S8 A64])))
original cost = 8 + 5 + 18 + 18 (weighted: 49.000000), replacement cost = 10 +
22 + 22 (weighted: 54.000000); rejecting replacement
```
So it is tried but rejected for a cost reason.
While for the C case, the IR is just slightly different and the mem had the
plus+plus already and just proping in the shift/mult. So different cost paths
that cause the difference here.