Add support for vscale in computeConstantRange(), based on vscale_range attributes. This allows simplifying based on the precise range, rather than a KnownBits approximation (which will be off by a factor of two for the usual case of a power of two upper bound).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/ValueTracking.cpp | ||
---|---|---|
1160–1164 | Is it possible to create test for this? |
Comment Actions
Rebase over additional tests for the poison case. In this case all comparisons just fold to true (but could also fold to any other value).
Comment Actions
In this case all comparisons just fold to true (but could also fold to any other value).
What is the reason that the IR doesn't explicitly return poison in that case? (i.e. ret i1 poison)
Comment Actions
No particular reason, this just hasn't been implemented. (Would need a special case for empty ranges in simplifyICmpWithConstant.)
Comment Actions
Fair enough, I was mostly wondering if there was a fundamental reason for it or if my understanding of poison was lacking here :) Thanks for clarifying!
Is it possible to create test for this?