From a6abc0cb584a3eea50f8a06ce7460f9ac92dba3f Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Mon, 13 May 2024 17:40:14 -0700 Subject: [PATCH] resolve aliases before evaluating constant-phi condition --- src/passes/basic_opt.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/passes/basic_opt.rs b/src/passes/basic_opt.rs index 72df20b..8cad990 100644 --- a/src/passes/basic_opt.rs +++ b/src/passes/basic_opt.rs @@ -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))); }