diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-12 14:58:02 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-12 14:58:02 -0400 |
commit | f2974b07109105b6d817a847d81ef5547b262609 (patch) | |
tree | 00686816a9b8f8026e033b0728838b0d915ed1a3 /gcc | |
parent | 1d12df723d8dc90f2f75b73bbf799725c214584b (diff) | |
download | gcc-f2974b07109105b6d817a847d81ef5547b262609.zip gcc-f2974b07109105b6d817a847d81ef5547b262609.tar.gz gcc-f2974b07109105b6d817a847d81ef5547b262609.tar.bz2 |
(movsf): Don't truncate if not register; clean up.
From-SVN: r7907
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 9915670..856bf45 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -3794,18 +3794,18 @@ if (GET_CODE (operands[0]) == MEM) { - operands[1] = force_reg (SFmode, operands[1]); - if (! TARGET_POWERPC) - if (reload_in_progress || reload_completed) - emit_insn (gen_truncdfsf2 (operands[1], + /* If operands[1] is a register, it may have double-precision data + in it, so truncate it to single precision. We need not do + this for POWERPC. */ + if (! TARGET_POWERPC && GET_CODE (operands[1]) == REG) + { + rtx newreg = reload_in_progress ? operands[1] : gen_reg_rtx (SFmode); + emit_insn (gen_truncdfsf2 (newreg, gen_rtx (SUBREG, DFmode, operands[1], 0))); - else - { - rtx newreg = gen_reg_rtx (SFmode); - emit_insn (gen_truncdfsf2 (newreg, - gen_rtx (SUBREG, DFmode, operands[1], 0))); - operands[1] = newreg; - } + operands[1] = newreg; + } + + operands[1] = force_reg (SFmode, operands[1]); } if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) < 32) |