[ConstantRangeTest] Add exhaustive intersectWith() test
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 27 Mar 2019 20:18:51 +0000 (20:18 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 27 Mar 2019 20:18:51 +0000 (20:18 +0000)
commitee9f2ae5b913cf571997091c4d7cac99eccd29a0
treed1ee42f902c8201aebd337dad71f0a790688110d
parent67646d0570b4e25215416cb5cf73756733e130e0
[ConstantRangeTest] Add exhaustive intersectWith() test

Add a test that checks the intersectWith() implementation against
all 4-bit range pairs. The test uses a more explicit way of
calculating the possible intersections, and checks that the right
one is picked out according to the smallest set heuristic.

This is in preparation for introducing intersectWith() variants that
use different heuristics to pick an intersection range, if there are
multiple possibilities.

llvm-svn: 357119
llvm/unittests/IR/ConstantRangeTest.cpp