From 30f0eb2d91e92e8944c59e6166102cbfec55cf23 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 7 Feb 2012 08:39:13 +1030 Subject: [PATCH] re PR target/52107 (IBM 128bit long double constant loaded inefficiently) PR target/52107 * config/rs6000/rs6000.c (rs6000_emit_move): Don't create DImode subregs of TFmode. From-SVN: r183945 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.c | 19 ++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9bacd9de42e..3307d716977 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-02-07 Alan Modra + + PR target/52107 + * config/rs6000/rs6000.c (rs6000_emit_move): Don't create DImode + subregs of TFmode. + 2012-02-06 Bill Schmidt PR tree-optimization/50969 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 4190b25817c..39c07141ccd 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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; }