25 lines
864 B
Diff
25 lines
864 B
Diff
2020-03-23 Richard Sandiford <richard.sandiford@arm.com>
|
|
|
|
PR target/94254
|
|
* config/rs6000/rs6000.c (rs6000_can_change_mode_class): Allow
|
|
FPRs to change between SDmode and DDmode.
|
|
|
|
--- gcc/config/rs6000/rs6000.c
|
|
+++ gcc/config/rs6000/rs6000.c
|
|
@@ -12307,6 +12307,15 @@ rs6000_can_change_mode_class (machine_mode from,
|
|
if (!BYTES_BIG_ENDIAN && (to == TDmode || from == TDmode))
|
|
return false;
|
|
|
|
+ /* Allow SD<->DD changes, since SDmode values are stored in
|
|
+ the low half of the DDmode, just like target-independent
|
|
+ code expects. We need to allow at least SD->DD since
|
|
+ rs6000_secondary_memory_needed_mode asks for that change
|
|
+ to be made for SD reloads. */
|
|
+ if ((to == DDmode && from == SDmode)
|
|
+ || (to == SDmode && from == DDmode))
|
|
+ return true;
|
|
+
|
|
if (from_size < 8 || to_size < 8)
|
|
return false;
|
|
|