The current infrastructure for exhaustive ConstantRange testing is somewhat confusing in what exactly it tests (D88283) and currently cannot even be used for operations that produce precise results, rather than signed/unsigned approximations.
This patch tries to make the testing more principled by collecting the exact set of results of an operation into a bit set and then comparing it against the range approximation by:
* Checking conservative correctness: All elements in the set must be in the range.
* Checking optimality: