Home | History | Annotate | Download | only in TableGen
      1 // RUN: llvm-tblgen %s | FileCheck %s
      2 // XFAIL: vg_leak
      3 
      4 // CHECK: --- Defs ---
      5 
      6 // CHECK: def A0 {
      7 // CHECK:   bits<8> add = { 0, 1, 0, 0, 0, 0, 0, 0 };
      8 // CHECK:   bits<8> and = { 0, 0, 0, 0, 0, 0, 0, 1 };
      9 // CHECK:   bits<8> or =  { 0, 0, 1, 1, 1, 1, 1, 1 };
     10 // CHECK:   bits<8> srl = { 0, 0, 0, 1, 1, 1, 1, 1 };
     11 // CHECK:   bits<8> sra = { 0, 0, 0, 1, 1, 1, 1, 1 };
     12 // CHECK:   bits<8> shl = { 0, 1, 1, 1, 1, 1, 1, 0 };
     13 // CHECK: }
     14 
     15 class A<bits<8> a, bits<2> b> {
     16   // Operands of different bits types are allowed.
     17   bits<8> add = !add(a, b);
     18   bits<8> and = !and(a, b);
     19   bits<8> or = !or(a, b);
     20   bits<8> srl = !srl(a, b);
     21   bits<8> sra = !sra(a, b);
     22   bits<8> shl = !shl(a, b);
     23 }
     24 
     25 def A0 : A<63, 1>;
     26