[llvm] Assert range attribute is not empty nor full (PR #100601)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 28 03:53:35 PDT 2024


nikic wrote:

I'm wondering whether we wouldn't be better off allowing empty ranges. I'm pretty sure that patches like https://github.com/llvm/llvm-project/pull/100899 are going to cause failures in edge cases (where ctpop is in dead code and we infer that no values are valid).

Similarly, if we have an existing range attribute and then want to add new information to it and we perform an intersection, we may end up with an empty range. In that case we'd need a special case to leave the original information alone.

I think things will overall be more robust if we make empty ranges valid (it just means that the value will always be poison).

https://github.com/llvm/llvm-project/pull/100601


More information about the llvm-commits mailing list