Skip to content

Commit 9a64614

Browse files
committed
Auto merge of #150309 - dianqk:ssa-range, r=cjgillot
New MIR Pass: SsaRangePropagation As an alternative to rust-lang/rust#150192. Introduces a new pass that propagates the known ranges of SSA locals. We can know the ranges of SSA locals at some locations for the following code: ```rust fn foo(a: u32) { let b = a < 9; if b { let c = b; // c is true since b is whitin the range [1, 2) let d = a < 8; // d is true since b whitin the range [0, 9) } } ``` This PR only implements a trivial range: we know one value on switch, assert, and assume.
2 parents cb78f53 + 4905a8b commit 9a64614

0 file changed

File tree

    0 commit comments

    Comments
     (0)