>> While it is straight forward to remove the movmisalign path in 4.9 and 4.8, >> this is not so simple in the 4.7 branch. The reason is that 4.7 uses >> "to_rtx = expand_normal (tem);" while 4.8 and 4.9 use >> "to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);" >> which does almost the same, but returns the misaligned rtx instead of >> an register with the value of the structure. And the generated code without >> the misalign path fails simply because the assignment goes to the register >> instead of the structure. >> >> So the problem is: there is no EXPAND_WRITE/EXPAND_MEMORY in 4.7... >> >> A possible patch for 4.7 would be like the attached (untested) patch. > > Let's simply declare this as WONTFIX on the 4.7 branch. > > -- > Eric Botcazou
I absolutely agree with you. This was only meant as a theoretical exercise. I was just nervous, if removing the misalign path is the right fix here, because as Martin pointed out that SRA behaves quite differently in the 4.7 branch, and pr50444.c does test nothing in 4.8 and trunk. The result is: yes. Removing the misalign path will be OK on trunk. Bernd.