[RS6000] Force source of fix_trunc<mode>si2 to reg

* config/rs6000/rs6000.md (fix_trunc<mode>si2): Force source operand
	to a reg.  Localize vars.

From-SVN: r239011
This commit is contained in:
Alan Modra 2016-08-03 10:03:37 +09:30 committed by Alan Modra
parent 819c714522
commit d1f0a70a12
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2016-08-03 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (fix_trunc<mode>si2): Force source operand
to a reg. Localize vars.
2016-08-03 Alan Modra <amodra@gmail.com> 2016-08-03 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.opt: Remove negatives from help strings * config/rs6000/rs6000.opt: Remove negatives from help strings

View File

@ -5357,15 +5357,15 @@
{ {
if (!<E500_CONVERT>) if (!<E500_CONVERT>)
{ {
rtx tmp, stack; rtx src = force_reg (SFmode, operands[1]);
if (TARGET_STFIWX) if (TARGET_STFIWX)
emit_insn (gen_fix_trunc<mode>si2_stfiwx (operands[0], operands[1])); emit_insn (gen_fix_trunc<mode>si2_stfiwx (operands[0], src));
else else
{ {
tmp = gen_reg_rtx (DImode); rtx tmp = gen_reg_rtx (DImode);
stack = rs6000_allocate_stack_temp (DImode, true, false); rtx stack = rs6000_allocate_stack_temp (DImode, true, false);
emit_insn (gen_fix_trunc<mode>si2_internal (operands[0], operands[1], emit_insn (gen_fix_trunc<mode>si2_internal (operands[0], src,
tmp, stack)); tmp, stack));
} }
DONE; DONE;