[llvm] Assert range attribute is not empty nor full (PR #100601)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 07:15:47 PDT 2024
nikic wrote:
> or keep the lang ref as is and do as AttrBuilder::addDereferenceableAttr that we only add the attribute if not empty/full
Not sure about just silently dropping the empty case. For full, this is equivalent to not having the attribute, so that makes sense. For empty, this will result in some non-monotonic behavior. E.g. if you originally have range(0, 5) and then intersect with range(4, 10) you get range(4, 5), but if you intersect with range(5, 10) you instead keep range(0, 5). That is, inferring a better range results in worse attributes being materialized. That doesn't break anything, but it's probably still undesirable.
https://github.com/llvm/llvm-project/pull/100601
More information about the llvm-commits
mailing list