list-element-bitref.td 340 B

123456789101112131415
  1. // RUN: llvm-tblgen %s | FileCheck %s
  2. // XFAIL: vg_leak
  3. class C<list<bits<4>> 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. def c0 : C<[0b0101, 0b1010]>;
  9. // CHECK: def c0
  10. // CHECK-NEXT: bits<2> V0 = { 0, 1 };
  11. // CHECK-NEXT: bits<2> V1 = { 1, 0 };
  12. // CHECK-NEXT: string V2 = "Odd";