[PATCH] D46223: Introduce a direct LLVM IR execution UnitTests framework, and add the first such test.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 19:14:16 PDT 2018


chandlerc created this revision.
chandlerc added reviewers: rnk, hfinkel.
Herald added subscribers: mgorny, mcrosier, sanjoy.

The framework should allow us to easily add execution test coverage to
LLVM without having to necessarily be able to convince a particular
frontend to generate a particular IR pattern. Instead, the tests can be
written directly in LLVM IR and converted to bitcode to avoid churn when
the textual IR format changes in uninteresting ways.

This also adds the first test which does basic large integer math to
exercise the legalization logic in LLVM. Right now we have massive
FileCheck tests in LLVM that provide low value and are impossible to
review updates for because they are checking each individual
instruction. Instead, we can use execution tests to both ensure that
LLVM can successfully code generate these IR patterns, and that the
resulting instructions behave as expected.

For example, this test uses a specific pattern of inputs designed to
stress test the carry handling in an large integer multiplication.


Repository:
  rT test-suite

https://reviews.llvm.org/D46223

Files:
  Bitcode/CMakeLists.txt
  Bitcode/UnitTests/CMakeLists.txt
  Bitcode/UnitTests/README.md
  Bitcode/UnitTests/large_int/CMakeLists.txt
  Bitcode/UnitTests/large_int/driver.cpp
  Bitcode/UnitTests/large_int/large_int.bc
  Bitcode/UnitTests/large_int/large_int.ll
  Bitcode/UnitTests/update_bc.sh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46223.144430.patch
Type: text/x-patch
Size: 8700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180428/0ac6cb0f/attachment.bin>


More information about the llvm-commits mailing list