Commit 2ec2984b authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Skip shift dependency if no other users

If a shift operation has a dependency operand (64bit shifts),
then instruction selection inserts a dependency edge between them,
so the scheduler orders them correctly. However, if the operand
is not used, the scheduler is confused about the dependency edge, which
is never resolved.

Fixes opt/longlong.c testcase

[r28434]
parent 62fa2bac
......@@ -1144,9 +1144,13 @@ static ir_node *gen_shift_binop(ir_node *node, ir_node *op1, ir_node *op2,
/* lowered shift instruction may have a dependency operand, handle it here */
if (get_irn_arity(node) == 3) {
/* we have a dependency */
ir_node *new_dep = be_transform_node(get_irn_n(node, 2));
ir_node* dep = get_irn_n(node, 2);
if (get_irn_n_edges(dep) > 1) {
/* ... which has at least one user other than 'node' */
ir_node *new_dep = be_transform_node(dep);
add_irn_dep(new_node, new_dep);
}
}
return new_node;
}
......
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