/* A pass for lowering trees to RTL.
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
enum machine_mode opmode = GET_MODE (op0);
if (opmode == VOIDmode)
- opmode = mode1;
+ opmode = TYPE_MODE (TREE_TYPE (tem));
/* This condition may hold if we're expanding the address
right past the end of an array that turned out not to
? SIGN_EXTRACT
: ZERO_EXTRACT, mode,
GET_MODE (op0) != VOIDmode
- ? GET_MODE (op0) : mode1,
+ ? GET_MODE (op0)
+ : TYPE_MODE (TREE_TYPE (tem)),
op0, GEN_INT (bitsize), GEN_INT (bitpos));
}
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{
if (e->insns.r)
- commit_one_edge_insertion (e);
+ {
+ /* Avoid putting insns before parm_birth_insn. */
+ if (e->src == ENTRY_BLOCK_PTR
+ && single_succ_p (ENTRY_BLOCK_PTR)
+ && parm_birth_insn)
+ {
+ rtx insns = e->insns.r;
+ e->insns.r = NULL_RTX;
+ emit_insn_after_noloc (insns, parm_birth_insn, e->dest);
+ }
+ else
+ commit_one_edge_insertion (e);
+ }
else
ei_next (&ei);
}