Fixes #119045 Integer range analysis tried to be clever and update the constant value lattice when it inferred something to be a constant. However, this caused correctness issues, because the integer range analysis can go from "constant" to "not a constant" once more control edges are analyzed, but the constant value lattice is used by dead code elimination to skip branches ... including those that might prove that the conditional for the branch isn't actually a constant. Unlike in my ancient attempt at a fix, the solution is just to stop trying to be clever. This change required loading the constant propagation analysis in -arith-unsigned-when-equivalent to keep tests working (which should have been loaded anyway to make the dead code analysis work correctly). No AI tools used.
9.8 KiB
9.8 KiB