range-analysis
range-analysis copied to clipboard
Missing range discovery for `select`
define i32 @test1(i1 %C) {
br i1 %C, label %exit, label %body
body:
%A = select i1 %C, i32 10, i32 11
ret i32 %A
exit:
ret i32 10
}
Not sure how hard would it be to get this working, but this is a pattern that appears sorely often in LLVM. Here:
%A = select i1 %C, i32 10, i32 11
%C is clearly zero so the range of %A is [11;11]
.