blob: 7db3d31167fd2021dde415440c6fbbf6d83a9261 [file] [log] [blame]
Michael Liao026f8332012-09-06 23:32:48 +00001// RUN: llvm-tblgen %s | FileCheck %s
Michael Liao026f8332012-09-06 23:32:48 +00002
3class C<list<bits<8>> L> {
4 bits<2> V0 = L[0]{1-0};
5 bits<2> V1 = L[1]{3-2};
6 string V2 = !if(L[0]{0}, "Odd", "Even");
7}
8
9def c0 : C<[0b0101, 0b1010]>;
10
11// CHECK: def c0
Jakub Staszakc6ecd7d2012-12-12 21:10:56 +000012// CHECK-NEXT: bits<2> V0 = { 0, 1 };
13// CHECK-NEXT: bits<2> V1 = { 1, 0 };
14// CHECK-NEXT: string V2 = "Odd";