Commit 8196d8e3 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

peephole_ia32_Test() would due to a bug only remove an ia32_Test if its direct...

peephole_ia32_Test() would due to a bug only remove an ia32_Test if its direct successor was the desired node.  If the desired node was an indirect successor, it would incorrectly identify it as flags destroyer.

[r22479]
parent edb11cbd
......@@ -274,12 +274,14 @@ static void peephole_ia32_Test(ir_node *node)
/* walk schedule up and abort when we find left or some other node destroys
the flags */
schedpoint = sched_prev(node);
while(schedpoint != left) {
schedpoint = node;
for (;;) {
schedpoint = sched_prev(schedpoint);
if(arch_irn_is(arch_env, schedpoint, modify_flags))
if (schedpoint == left)
break;
if (arch_irn_is(arch_env, schedpoint, modify_flags))
return;
if(schedpoint == block)
if (schedpoint == block)
panic("couldn't find left");
}
......
Supports Markdown
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