resolve aliases before evaluating constant-phi condition

This commit is contained in:
Chris Fallin 2024-05-13 17:40:14 -07:00 committed by Graham Kelly
parent 344c45e178
commit a6abc0cb58

View file

@ -125,6 +125,7 @@ impl<'a> BasicOptPass<'a> {
let input = body.blocks[pred]
.terminator
.visit_target(pos, |target| target.args[i]);
let input = body.resolve_alias(input);
inputs.push(input);
const_val = ConstVal::meet(const_val, Some(value_is_const(input, body)));
}