Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 30337 Build 30336: arc lint + arc unit
Event Timeline
Comment Actions
The main problem this patch addresses is the RHS == full-set case, where we exit early.
llvm/lib/IR/ConstantRange.cpp | ||
---|---|---|
1015 | This full set check looks pretty bogus to me The result of CR1 udiv CR2 should be some subset of [0, umax(CR1)], as you won't get back a larger value from a division. Your patch makes [0, 1) udiv full-set return [0, 1), but there are also other cases where the current code is inaccurate: [0, 5) udiv full-set should be [0, 5) [5, 10) udiv full-set should be [0, 10) Would it be possible to just drop this check? |
llvm/lib/IR/ConstantRange.cpp | ||
---|---|---|
1015 | Not sure why the check was there in the first place! It looks like we can generalize the handling and drop it. |
This full set check looks pretty bogus to me The result of CR1 udiv CR2 should be some subset of [0, umax(CR1)], as you won't get back a larger value from a division. Your patch makes [0, 1) udiv full-set return [0, 1), but there are also other cases where the current code is inaccurate:
Would it be possible to just drop this check?