<div><font>Hi Paul:</font></div><div><font>Thanks for the help. I've reduced my test case to the snippet below:</font></div><div><font>```</font></div><div><font><div>class InstTest<bits<8> opcode,string asm,dag outs,dag ins,bits<2> regType> : Instruction{</div><div>    bits<8> imm;</div><div>    bits<8> dst;</div><div>    field bits<32> Inst;</div><div>    let Inst{7-0} = imm;</div><div>    let Inst{8-15} = dst;</div><div>    let OutOperandList = outs;</div><div>    let InOperandList = ins;</div><div>    let AsmString = asm;</div><div>}</div><div>class InstTest2<bits<8> opcode,string asm,dag outs,dag ins,bits<2> regType> : Instruction{</div><div>    field bits<32> Inst;</div><div>    let Inst{7-0} = 0b00000000;</div><div>    let Inst{8-15} = 0b00000000;</div><div>    let OutOperandList = outs;</div><div>    let InOperandList = ins;</div><div>    let AsmString = asm;</div><div>}</div><div>def RI : InstTest2<0x1,"test $dst,$imm",(outs GP8:$dst),(ins i8imm:$imm),REB>{</div><div>    let Pattern = [(set GP8:$dst,(i8 imm:$imm))];</div><div>}</div></font></div><div><font>```</font></div><div><font><br></font></div><div>Test2 works but InstTest doesn't. It seems the mere presence of the two bits<8> field causes this issue</div><div><includetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "llvm-dev"<llvm-dev@lists.llvm.org>;</div><div><b>Date: </b> Fri, Jan 1, 2021 00:12 AM</div><div><b>To: </b> "llvm-dev"<llvm-dev@lists.llvm.org>; <wbr></div><div></div><div><b>Subject: </b> Re: [llvm-dev] "Bits value must be constants" when generating ISel from Tablegen</div></div><div> </div><div style="position:relative;"><div id="tmpcontent_res"></div>Please post the full definitions of InstRI8 and InstRI8222, along with the full definition of X and the record that inherits from InstRI8222. Then I can reproduce the problem and try to help you.<br><br>_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org<br>https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br></div></div><!--<![endif]--></includetail></div>