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
..
2018-01-24 10:33:39 +00:00
2018-01-29 22:56:41 +00:00
2018-01-16 08:09:24 +00:00
2017-06-04 03:27:12 +00:00
2017-12-22 21:19:13 +00:00
2016-12-23 01:39:26 +00:00
2018-02-28 20:05:24 +00:00
2017-09-21 21:27:11 +00:00
2017-12-05 21:49:56 +00:00
2018-01-25 14:43:10 +00:00
2017-11-29 20:10:14 +00:00
2018-02-23 19:32:56 +00:00
2018-02-26 15:54:59 +00:00
2018-03-02 17:37:04 +00:00
2018-02-20 17:27:44 +00:00
2017-12-05 21:49:56 +00:00
2017-05-23 21:22:16 +00:00
2014-08-02 01:39:08 +00:00
2017-03-04 03:23:41 +00:00
2018-01-23 19:47:10 +00:00
2004-02-26 23:02:25 +00:00
2012-12-22 00:47:06 +00:00
2003-10-16 23:46:01 +00:00
2007-12-29 20:37:13 +00:00
2015-04-14 18:14:38 +00:00
2005-10-13 17:31:30 +00:00
2012-09-27 10:14:43 +00:00
2014-10-16 20:00:02 +00:00
2016-06-15 00:19:09 +00:00
2006-08-09 19:40:13 +00:00
2016-05-05 14:35:40 +00:00
2013-09-16 09:25:49 +00:00
2012-05-15 18:44:09 +00:00
2007-12-29 20:37:13 +00:00
2015-02-20 02:55:22 +00:00
2014-06-19 19:31:11 +00:00
2017-11-16 00:46:35 +00:00
2014-03-13 23:18:37 +00:00
2011-12-12 22:45:54 +00:00
2010-08-04 16:11:24 +00:00
2012-01-26 22:06:23 +00:00
2008-08-13 20:43:56 +00:00
2017-02-09 19:37:18 +00:00
2015-10-12 08:50:47 +00:00
2015-11-22 16:04:32 +00:00
2017-10-31 11:39:31 +00:00
2015-05-09 09:08:56 +00:00
2018-02-21 22:36:31 +00:00
2018-03-02 17:37:04 +00:00
2018-02-10 05:01:33 +00:00
2018-02-28 00:56:24 +00:00
2018-02-10 05:01:33 +00:00
2012-11-22 07:48:52 +00:00
2014-01-24 17:20:08 +00:00