diff --git a/gcc10-pr94254.patch b/gcc10-pr94254.patch new file mode 100644 index 0000000..408b90a --- /dev/null +++ b/gcc10-pr94254.patch @@ -0,0 +1,24 @@ +2020-03-23 Richard Sandiford + + 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; +