[PATCH] D61084: [ConstantRange] Add abs() support
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 14:45:58 PDT 2019
lebedev.ri added a comment.
I agree that the test makes sense, and the *logic* of the `ConstantRange::abs()` implementation makes sense.
But i'm not sure about `INT_MIN` handling.
The test certainly works, because we are only checking 4-bit values, while `APInt` is 64-bit or more.
What happens for `ConstantRange`'s of larger width?
Maybe you should return `ConstantRange` with bitwidth larger by one if `INT_MIN` is included?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61084/new/
https://reviews.llvm.org/D61084
More information about the llvm-commits
mailing list