[ConstantRangeTest] Print detailed information on failure (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 20 Feb 2021 18:53:38 +0000 (19:53 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 20 Feb 2021 19:05:11 +0000 (20:05 +0100)
commit5ec75c600713d529cee75943f398d12df15574db
tree1d4b14521ab5a4ebe8152e923903307f8a9deee9
parent28d9953af9be537f7602fbd445838e8cceb8d372
[ConstantRangeTest] Print detailed information on failure (NFC)

When the optimality check fails, print the inputs, the computed
range and the better range that was found. This makes it much
simpler to identify the cause of the failure.

Make sure that full ranges (which, unlikely all the other cases,
have multiple ways to construct them that all result in the same
range) only print one message by handling them separately.
llvm/unittests/IR/ConstantRangeTest.cpp