[PATCH] D88283: [NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 01:29:18 PDT 2020


lebedev.ri created this revision.
lebedev.ri added a project: LLVM.
lebedev.ri requested review of this revision.

I have long complained that while we have exhaustive tests
for ConstantRange, they are, uh, not good.

The approach of groking our own constant range
via exhaustive enumeration is, mysterious.

It neither tells us without doubt that the result is
conservatively correct, nor the precise match to the ConstantRange
result tells us that the result is precise.
But yeah, it's fast, i give it that.

In short, there are three things that we need to check:

1. That ConstantRange result is conservatively correct
2. That ConstantRange range is reasonable
3. That ConstantRange result is reasonably precise

So let's not just check the middle one, but all three.

This provides precision test coverage for D88178 <https://reviews.llvm.org/D88178>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88283

Files:
  llvm/unittests/IR/ConstantRangeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88283.294245.patch
Type: text/x-patch
Size: 4206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200925/02267b38/attachment.bin>


More information about the llvm-commits mailing list