Commit d1a66d48 authored by Michael Beck's avatar Michael Beck
Browse files

get_irn_MacroBlock(): if the Block of a node is Bad, do NOT try to returns its MB, return Bad.

parent 06430e7b
......@@ -879,8 +879,12 @@ ir_node *get_Block_MacroBlock(const ir_node *block) {
/* returns the macro block header of a node. */
ir_node *get_irn_MacroBlock(const ir_node *n) {
if (! is_Block(n))
if (! is_Block(n)) {
n = get_nodes_block(n);
/* if the Block is Bad, do NOT try to get it's MB, it will fail. */
if (is_Bad(n))
return n;
return get_Block_MacroBlock(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