Commit 0814dbdb authored by Matthias Braun's avatar Matthias Braun
Browse files

do gigo earlier to avoid optimisations seeing bad inputs with wrong more

parent 68f1fef3
...@@ -6500,6 +6500,12 @@ ir_node *optimize_in_place_2(ir_node *n) ...@@ -6500,6 +6500,12 @@ ir_node *optimize_in_place_2(ir_node *n)
if (iro == iro_Deleted) if (iro == iro_Deleted)
return n; return n;
/* Remove nodes with dead (Bad) input.
Run always for transformation induced Bads. */
n = gigo(n);
if (is_Bad(n))
return n;
/* constant expression evaluation / constant folding */ /* constant expression evaluation / constant folding */
if (get_opt_constant_folding()) { if (get_opt_constant_folding()) {
/* neither constants nor Tuple values can be evaluated */ /* neither constants nor Tuple values can be evaluated */
...@@ -6545,10 +6551,6 @@ ir_node *optimize_in_place_2(ir_node *n) ...@@ -6545,10 +6551,6 @@ ir_node *optimize_in_place_2(ir_node *n)
(iro == iro_Proj)) /* Flags tested local. */ (iro == iro_Proj)) /* Flags tested local. */
n = transform_node(n); n = transform_node(n);
/* Remove nodes with dead (Bad) input.
Run always for transformation induced Bads. */
n = gigo(n);
/* Now we can verify the node, as it has no dead inputs any more. */ /* Now we can verify the node, as it has no dead inputs any more. */
irn_verify(n); irn_verify(n);
......
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