1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/TableGen/cond-empty-list-arg.td
Paul C. Anagnostopoulos 2d0f8816ca [TableGen] Eliminate uses of true and false in .td files.
They occurred in one NVPTX file and some test files.

Differential Revision: https://reviews.llvm.org/D90513
2020-10-31 10:54:33 -04:00

23 lines
420 B
TableGen

// RUN: llvm-tblgen %s | FileCheck %s
// XFAIL: vg_leak
// Check that !cond works with an empty list value.
class C<bit cond> {
bit True = 1;
list<int> X = !cond(cond: [1, 2, 3], True : []);
list<int> Y = !cond(cond: [], True : [4, 5, 6]);
}
// CHECK: def rec1
// CHECK: X = [];
// CHECK: Y = [4, 5, 6];
def rec1 : C<0>;
// CHECK: def rec2
// CHECK: X = [1, 2, 3];
// CHECK: Y = [];
def rec2 : C<1>;