https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119013
--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Jeffrey A. Law from comment #1) > The way we typically deal with these issues with rv64 is to create a DImode > temporary and store the result in there. We then use a narrowing subreg to > copy from the temporary to the ultimate destination. The narrowing subreg > will have magic REG_PROMOTED_P bits set. That in turn allows removal of the > explicit sign extension later. > > It's a bit awkward for a simple move pattern, but ought to still be doable. The problem is before reload we don't know if it's a FPR -> GPR move or a FPR -> FPR move, but after reload the first place we can handle this is split2 which is already too late. IMO maybe late_combine2 should handle this, but in reality: trying to combine definition of r4 in: 14: $r4:SF=$f0:SF into: 11: $r4:DI=sign_extend($r4:SI) -- RTL substitution failed because late combine disallows mode punning as at now.