From: amodra Date: Wed, 3 Aug 2016 00:33:37 +0000 (+0000) Subject: [RS6000] Force source of fix_truncsi2 to reg X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1d05ab7c21ea7d42f9da669564c759f7bf7c58c;p=thirdparty%2Fgcc.git [RS6000] Force source of fix_truncsi2 to reg * config/rs6000/rs6000.md (fix_truncsi2): Force source operand to a reg. Localize vars. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239011 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da112f402fb6..a75f39fdbbbd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-08-03 Alan Modra + + * config/rs6000/rs6000.md (fix_truncsi2): Force source operand + to a reg. Localize vars. + 2016-08-03 Alan Modra * config/rs6000/rs6000.opt: Remove negatives from help strings diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 5afae92291c3..45ad66104fa8 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5357,15 +5357,15 @@ { if (!) { - rtx tmp, stack; + rtx src = force_reg (SFmode, operands[1]); if (TARGET_STFIWX) - emit_insn (gen_fix_truncsi2_stfiwx (operands[0], operands[1])); + emit_insn (gen_fix_truncsi2_stfiwx (operands[0], src)); else { - tmp = gen_reg_rtx (DImode); - stack = rs6000_allocate_stack_temp (DImode, true, false); - emit_insn (gen_fix_truncsi2_internal (operands[0], operands[1], + rtx tmp = gen_reg_rtx (DImode); + rtx stack = rs6000_allocate_stack_temp (DImode, true, false); + emit_insn (gen_fix_truncsi2_internal (operands[0], src, tmp, stack)); } DONE;