constant-blockparam: ignore inputs that are cyclic from same blockparam

This commit is contained in:
Chris Fallin 2024-05-13 17:47:06 -07:00 committed by Graham Kelly
parent a6abc0cb58
commit 55e2f1d0eb

View file

@ -126,7 +126,9 @@ impl<'a> BasicOptPass<'a> {
.terminator
.visit_target(pos, |target| target.args[i]);
let input = body.resolve_alias(input);
if input != blockparam {
inputs.push(input);
}
const_val = ConstVal::meet(const_val, Some(value_is_const(input, body)));
}
let const_val = const_val.unwrap();