Commit df1a98ae by Eric Botcazou Committed by Eric Botcazou

re PR rtl-optimization/34628 (problems with inlining on ARM)

	PR rtl-optimization/34628
	* combine.c (try_combine): Stop and undo after the first combination
	if an autoincrement side-effect on the first insn has effectively
	been lost.

From-SVN: r131744
parent ec46053b
2008-01-22 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/34628
* combine.c (try_combine): Stop and undo after the first combination
if an autoincrement side-effect on the first insn has effectively
been lost.
2008-01-22 David Edelsohn <edelsohn@gnu.org> 2008-01-22 David Edelsohn <edelsohn@gnu.org>
PR target/34529 PR target/34529
......
...@@ -2751,12 +2751,17 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p) ...@@ -2751,12 +2751,17 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i1 && GET_CODE (newpat) != CLOBBER) if (i1 && GET_CODE (newpat) != CLOBBER)
{ {
/* Before we can do this substitution, we must redo the test done /* Check that an autoincrement side-effect on I1 has not been lost.
above (see detailed comments there) that ensures that I1DEST This happens if I1DEST is mentioned in I2 and dies there, and
isn't mentioned in any SETs in NEWPAT that are field assignments. */ has disappeared from the new pattern. */
if ((FIND_REG_INC_NOTE (i1, NULL_RTX) != 0
if (! combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX, && !i1_feeds_i3
0, (rtx*) 0)) && dead_or_set_p (i2, i1dest)
&& !reg_overlap_mentioned_p (i1dest, newpat))
/* Before we can do this substitution, we must redo the test done
above (see detailed comments there) that ensures that I1DEST
isn't mentioned in any SETs in NEWPAT that are field assignments. */
|| !combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX, 0, 0))
{ {
undo_all (); undo_all ();
return 0; return 0;
......
2008-01-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/20080122-1.c: New test.
2008-01-22 Tom Tromey <tromey@redhat.com> 2008-01-22 Tom Tromey <tromey@redhat.com>
PR c++/34859: PR c++/34859:
/* PR rtl-optimization/34628 */
/* Origin: Martin Michlmayr <tbm@cyrius.com> */
typedef unsigned short u16;
typedef unsigned char u8;
static void
do_segfault(u8 in_buf[], const u8 out_buf[], const int len)
{
int i;
for (i = 0; i < len; i++) {
asm("");
in_buf[2*i] = ( out_buf[2*i] | out_buf[(2*i)+1]<<8 ) & 0xFF;
asm("");
in_buf[(2*i)+1] = ( out_buf[2*i] | out_buf[(2*i)+1]<<8 ) >> 8;
asm("");
}
}
int main(int argc, char *argv[])
{
u8 outbuf[32] = "buffer ";
u8 inbuf[32] = "\f";
asm("");
do_segfault(inbuf, outbuf, 12);
asm("");
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment