aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-08-03 10:03:37 +0930
committerAlan Modra <amodra@gcc.gnu.org>2016-08-03 10:03:37 +0930
commitd1f0a70a1284af293bbd95e31cdbeb8ac6db9885 (patch)
tree9f6e80f479680adcaf951ede0c380432694f9478
parent819c714522edca323f1d45dc35018a0a41db7e7d (diff)
downloadgcc-d1f0a70a1284af293bbd95e31cdbeb8ac6db9885.zip
gcc-d1f0a70a1284af293bbd95e31cdbeb8ac6db9885.tar.gz
gcc-d1f0a70a1284af293bbd95e31cdbeb8ac6db9885.tar.bz2
[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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.md10
2 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index da112f4..a75f39f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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>
+
* config/rs6000/rs6000.opt: Remove negatives from help strings
and comments.
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 5afae92..45ad661 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -5357,15 +5357,15 @@
{
if (!<E500_CONVERT>)
{
- rtx tmp, stack;
+ rtx src = force_reg (SFmode, operands[1]);
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
{
- tmp = gen_reg_rtx (DImode);
- stack = rs6000_allocate_stack_temp (DImode, true, false);
- emit_insn (gen_fix_trunc<mode>si2_internal (operands[0], operands[1],
+ rtx tmp = gen_reg_rtx (DImode);
+ rtx stack = rs6000_allocate_stack_temp (DImode, true, false);
+ emit_insn (gen_fix_trunc<mode>si2_internal (operands[0], src,
tmp, stack));
}
DONE;