41 lines · plain
1// RUN: llvm-tblgen %s | FileCheck %s2// XFAIL: vg_leak3 4// CHECK: --- Defs ---5 6// Test that P and Q are not replaced by ?. TableGen's codegen emitter backend7// relies on keeping variable references like this around to describe the8// structure of instruction encodings.9//10// CHECK: def A {11// CHECK: bits<8> Inst = { 1, 1, 1, 1, 1, 1, P, Q };12// CHECK: bits<2> src = { ?, ? };13// CHECK: bit P = ?;14// CHECK: bit Q = ?;15// CHECK: }16 17def A {18 bits<8> Inst;19 bits<2> src;20 21 bit P;22 bit Q;23 24 let Inst{7...2} = 0x3f;25 let Inst{1} = P;26 let Inst{0} = Q;27 28 let P = src{1};29 let Q = src{0};30}31 32class x {33 field bits<32> A;34}35 36class y<bits<2> B> : x {37 let A{21...20} = B;38}39 40def z : y<{0,?}>;41