re PR target/52107 (IBM 128bit long double constant loaded inefficiently)
authorAlan Modra <amodra@gmail.com>
Mon, 6 Feb 2012 22:09:13 +0000 (08:39 +1030)
committerAlan Modra <amodra@gcc.gnu.org>
Mon, 6 Feb 2012 22:09:13 +0000 (08:39 +1030)
PR target/52107
* config/rs6000/rs6000.c (rs6000_emit_move): Don't create DImode
subregs of TFmode.

From-SVN: r183945

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 9bacd9de42efda08c5f935f022b0ed5a46a7cc02..3307d716977aa7f90be1897835445e2ca5bae522 100644 (file)
@@ -1,3 +1,9 @@
+2012-02-07  Alan Modra  <amodra@gmail.com>
+
+       PR target/52107
+       * config/rs6000/rs6000.c (rs6000_emit_move): Don't create DImode
+       subregs of TFmode.
+
 2012-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        PR tree-optimization/50969
index 4190b25817ce4d59a78f4ed1e5e767bf39fc3677..39c07141ccdb2ac107e484e54432d9f423b9e935 100644 (file)
@@ -7010,17 +7010,14 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
   if (!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128
       && mode == TFmode && GET_CODE (operands[1]) == CONST_DOUBLE)
     {
-      /* DImode is used, not DFmode, because simplify_gen_subreg doesn't
-        know how to get a DFmode SUBREG of a TFmode.  */
-      enum machine_mode imode = (TARGET_E500_DOUBLE ? DFmode : DImode);
-      rs6000_emit_move (simplify_gen_subreg (imode, operands[0], mode, 0),
-                       simplify_gen_subreg (imode, operands[1], mode, 0),
-                       imode);
-      rs6000_emit_move (simplify_gen_subreg (imode, operands[0], mode,
-                                            GET_MODE_SIZE (imode)),
-                       simplify_gen_subreg (imode, operands[1], mode,
-                                            GET_MODE_SIZE (imode)),
-                       imode);
+      rs6000_emit_move (simplify_gen_subreg (DFmode, operands[0], mode, 0),
+                       simplify_gen_subreg (DFmode, operands[1], mode, 0),
+                       DFmode);
+      rs6000_emit_move (simplify_gen_subreg (DFmode, operands[0], mode,
+                                            GET_MODE_SIZE (DFmode)),
+                       simplify_gen_subreg (DFmode, operands[1], mode,
+                                            GET_MODE_SIZE (DFmode)),
+                       DFmode);
       return;
     }