[ValueTracking] Make unit tests easier to write; NFC
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 30 Nov 2018 22:22:30 +0000 (22:22 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 30 Nov 2018 22:22:30 +0000 (22:22 +0000)
commit219e5367d01151356a5cee7945f0c60535f7f000
treeae0ee70178d27712ca89e82f8e622e786b7dff4f
parent5842df93dd3fd70ab1ca5ba9ed6b4010c233f330
[ValueTracking] Make unit tests easier to write; NFC

Generalize the existing MatchSelectPatternTest class to also work
with other types of tests. This reduces the amount of boilerplate
necessary to write ValueTracking tests in general, and computeKnownBits
tests in particular.

The inherited convention is that the function must be @test and the
tested instruction %A.

Differential Revision: https://reviews.llvm.org/D55141

llvm-svn: 348043
llvm/unittests/Analysis/ValueTrackingTest.cpp