resolve aliases before evaluating constant-phi condition
This commit is contained in:
parent
344c45e178
commit
a6abc0cb58
|
@ -125,6 +125,7 @@ impl<'a> BasicOptPass<'a> {
|
||||||
let input = body.blocks[pred]
|
let input = body.blocks[pred]
|
||||||
.terminator
|
.terminator
|
||||||
.visit_target(pos, |target| target.args[i]);
|
.visit_target(pos, |target| target.args[i]);
|
||||||
|
let input = body.resolve_alias(input);
|
||||||
inputs.push(input);
|
inputs.push(input);
|
||||||
const_val = ConstVal::meet(const_val, Some(value_is_const(input, body)));
|
const_val = ConstVal::meet(const_val, Some(value_is_const(input, body)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue