aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index ebed78f..019bbb6 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -5488,20 +5488,21 @@ expand_fix (rtx to, rtx from, int unsignedp)
if (icode != CODE_FOR_nothing)
{
rtx_insn *last = get_last_insn ();
+ rtx from1 = from;
if (fmode != GET_MODE (from))
- from = convert_to_mode (fmode, from, 0);
+ from1 = convert_to_mode (fmode, from, 0);
if (must_trunc)
{
- rtx temp = gen_reg_rtx (GET_MODE (from));
- from = expand_unop (GET_MODE (from), ftrunc_optab, from,
- temp, 0);
+ rtx temp = gen_reg_rtx (GET_MODE (from1));
+ from1 = expand_unop (GET_MODE (from1), ftrunc_optab, from1,
+ temp, 0);
}
if (imode != GET_MODE (to))
target = gen_reg_rtx (imode);
- if (maybe_emit_unop_insn (icode, target, from,
+ if (maybe_emit_unop_insn (icode, target, from1,
doing_unsigned ? UNSIGNED_FIX : FIX))
{
if (target != to)