llvm-project/llvm/utils
Fangrui Song 0a301a194e [utils] Add utils/update_cc_test_checks.py
A utility to update LLVM IR in C/C++ FileCheck test files.

Example RUN lines in .c/.cc test files:

// RUN: %clang -S -Os -DXX %s -o - | FileCheck %s
// RUN: %clangxx -S -Os %s -o - | FileCheck -check-prefix=IR %s

Usage:

% utils/update_cc_test_checks.py --llvm-bin=release/bin test/a.cc
% utils/update_cc_test_checks.py --c-index-test=release/bin/c-index-test --clang=release/bin/clang /tmp/c/a.cc

    // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
    // RUN: %clang -emit-llvm -S -Os -DXX %s -o - | FileCheck -check-prefix=AA %s
    // RUN: %clangxx -emit-llvm -S -Os %s -o - | FileCheck -check-prefix=BB %s
    using T =
    #ifdef XX
        int __attribute__((vector_size(16)))
    #else
        short __attribute__((vector_size(16)))
    #endif
        ;

    // AA-LABEL: _Z3fooDv4_i:
    // AA:       entry:
    // AA-NEXT:    %add = shl <4 x i32> %a, <i32 1, i32 1, i32 1, i32 1>
    // AA-NEXT:    ret <4 x i32> %add
    //
    // BB-LABEL: _Z3fooDv8_s:
    // BB:       entry:
    // BB-NEXT:    %add = shl <8 x i16> %a, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
    // BB-NEXT:    ret <8 x i16> %add
    T foo(T a) {
      return a + a;
    }

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

llvm-svn: 326591
2018-03-02 17:37:04 +00:00
..
FileCheck [FileCheck] - Fix possible buffer out of bounds access when parsing --check-prefix. 2018-01-16 08:09:24 +00:00
KillTheDoctor
LLVMVisualizers
Misc
PerfectShuffle
TableGen Shrink various scheduling tables by using narrower types. 2018-02-23 19:32:56 +00:00
Target/ARM
UpdateTestChecks [utils] Add utils/update_cc_test_checks.py 2018-03-02 17:37:04 +00:00
bugpoint
count
crosstool
docker Fix typos of occurred and occurrence 2018-01-24 10:33:39 +00:00
emacs Fix some regular expressions in llvm-mode.el. 2018-01-29 22:56:41 +00:00
fpcmp
gdb-scripts Make the Twine pretty-printer work with GDB 7.11 2017-06-04 03:27:12 +00:00
git
git-svn [git-llvm] Handle files ignored by svn correctly 2017-12-22 21:19:13 +00:00
jedit
kate
lint
lit Losen time contraint to accommodate system loads 2018-02-28 20:05:24 +00:00
llvm-build
llvm-lit [lit] Actually do normalize the case of files in the config map. 2017-09-21 21:27:11 +00:00
not [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
release Update build_llvm_package.bat 2018-01-25 14:43:10 +00:00
sanitizers Add libstd++-4.8 exceptions to ubsan_blacklist.txt 2017-11-29 20:10:14 +00:00
testgen
textmate
unittest Revert r326092: [gtest] Add PrintTo overload for StringRef. 2018-02-26 15:54:59 +00:00
valgrind
vim [vim] Recognize more FileCheck comments 2018-02-20 17:27:44 +00:00
vscode Adding VSCode syntax colorizer to utils (generated from textmate colorizer). 2017-05-09 17:13:37 +00:00
yaml-bench [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
DSAclean.py
DSAextract.py
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
LLVMBuild.txt
UpdateCMakeLists.pl
abtest.py AsmPrinter: mark the beginning and the end of a function in verbose mode 2017-05-23 21:22:16 +00:00
bisect
bisect-skip-count Fix bug in bisect-skip-count not using passed-in arguments 2017-03-04 03:23:41 +00:00
bugpoint_gisel_reducer.py Add a utility to reduce GlobalISel tests 2018-01-23 19:47:10 +00:00
check-each-file
clang-parse-diagnostics-file
codegen-diff
countloc.sh
create_ladder_graph.py
extract_symbols.py
findmisopt
findoptdiff
findsym.pl
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check
llvm-gisel-cov.py [globalisel][tablegen] Generate rule coverage and use it to identify untested rules 2017-11-16 00:46:35 +00:00
llvm-native-gxx
llvm.grm
llvmdo
llvmgrep
makellvm
prepare-code-coverage-artifact.py
schedcover.py
shuffle_fuzz.py
shuffle_select_fuzz_tester.py Adding a shufflevector and select LLVM IR instructions fuzz tool 2017-10-31 11:39:31 +00:00
sort_includes.py
unicode-case-fold.py Resubmit r325107 (case folding DJB hash) 2018-02-21 22:36:31 +00:00
update_cc_test_checks.py [utils] Add utils/update_cc_test_checks.py 2018-03-02 17:37:04 +00:00
update_llc_test_checks.py [utils] Refactor utils/update_{,llc_}test_checks.py to share more code 2018-02-10 05:01:33 +00:00
update_mir_test_checks.py update_mir_test_checks: Use the regexes from UpdateTestChecks.common 2018-02-28 00:56:24 +00:00
update_test_checks.py [utils] Refactor utils/update_{,llc_}test_checks.py to share more code 2018-02-10 05:01:33 +00:00
wciia.py