<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJzFl0uT2jgQgH-Nuahw6eHngQPzILu1SWV2hmztjZItAd41NpHkBP79tmQDtickmWRSayhbluTur1tqqZXV4jjzIpyXXGv0oOp1UUqP3WaFQQeP3iJbOHrsHnnxjYfvPDxHru5wQB67gz5sUH08uurjudqL77qCuwu5Rg-EQKd5TxsBTQSUnL9y3TAedcPQDfe7tfeWfbmEHl1ftH9OrK0e-zVScjOktk3Utqx3ZiQboVIaW-_M8ijJ60p4NIGS_AjPvX9wbgILUkcLSi2mU2KLYD786e1J3PgyqpHuQwYSRsq_4Lvbpf25D1qDyTO_3S3tr9cFD30W4b5QVdfGC_BGVpuPBXzjxfceXZjd3qMM7F24drooy0-76Y5rIxW8ZU1RCvssqlObyUqQgabTvSoqM1Uyr5XQKGs21mO-Ea26h7f386d7pJtsB7OF23Zw1b5WBpkabY3ZawtBF_DfFGbbZH5e7zolJ117Vf8jc4tVaN1IDQXEK4GKKi8bIZHZSpQrrrco4_m_RvFc-q36JwMVSDRgHuscgP12IGDqbBTfIa42zU5WdlLMf4EDQCTDCB8wXKG7eEiDJEDOQIBic33UbeHBSnLIS2sDTLdLJ8U_r2ptlOTglsjOOOjrJuEV5JMDiwzuT83e-hxKH6riYCuKTcVL7YMLQXgYhXCn9IJMxsghgwgd8rUyfoORKK3G5FNdgI_mrwUVMYjRObkw0RETJjz6khsfm2qApl38vhjqRJPv7eRJY-shfKFhIxoiBEZjl7ziGAU4Hroj6ADiNVzxOiMsx2i1UlKbWskVRJizu5N-SKJVFEzLomoO003VtA17s4UZJXxd-7CK3eADCUGKXZnOasKhnUmahKLn9Q_V-_3vVWHat0Vtw6Q3bR9dWLhZAXtLXZfWHRAg2nyfU5Y8K-UbaaOuFdUNR2IXuXnUG49oxMkxZlc5wUl1-Uk-yrVUssrtkjKAdq3KBdrr4EZ28IKeW-MRbhxL3sO9gV3q_8MNYmK9G11wkyFuyoQI0bNhfins7TMRf_GyNeAlC8k1MwA7ggdLLnakQzvykAdJD2L55oErDRrc21yIpya7tenG9Ul9qT71PVveDchLbThBnKyIrRFRZ4Rdm0f7iaAxXl81wpXfZ3YDvYHk75ohP4-Zpgk84gsmGWOmcfB1zDu5HvC9a0pTdP5_DUaGmd3o2IVxtKeIME2z73Hlr8WM3G4T0AsnG3Nm8fV52-N8W-hfzBrTwGYQF9TgGWoefR11YdP9F-zRX6NxSUNvgMfbF4FZ2KfpRL3jNrNL8i1XvfWn3bLafdQ66xsZ2Tiw_pByf1qWf8Q4C9UZRkg0tGu43aUQbWmEdvDBt7Q0pij1yIld8RTJST8btMriQarBwxBnDFINAM5X2nBlVifNp0R5Y9um8m9i3t2cX6nP4Ny0yLXNPnz_XHSNTo5vMx0WjMZwuPmEcUiIRK3iLsd5WdLuMh1KQMo503mSG3sI4KaoK7TmECRWMgyidKcHKc49J2LGRMpSPuGN2dZqBo7b_FlMd20qpSeNKmc_frAJWRDiyXbGqQjyLBSJyGUmopDSjBCRRiSIZBLl6aTkmSz1zAvBv7SSn5ETAWUvvJv8PEExo5hSTGhM4jAm2BdMigyHJF8nKQ8whUOkhFEvfSvHr9VmomZOJJyANDSWsPLoSyMsOJDOSumAgdAUppSzJZzc-ofsFOkjjMIBjEFVbdDeBreAiFRwvjLlceIoZw7xPxxt_kU>53450</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            The !cond() syntax is not parsed correctly
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          GengQi-mthreads
      </td>
    </tr>
</table>

<pre>
    `class Profile<bit x, bit y> {
  bit xx = x;
  bit yy = y;
}

def P11 : Profile<1,1>;
def P00 : Profile<0,0>;

class TT<Profile p> {
  bits<10> reg;
  bits<2> fmt;

  let fmt = !cond(!eq(p.xx, 1) : {0, reg{0}},
                  true : 3);

}

def CTCTCT : TT<P11>;
def DTDTDT : TT<P00>;
`

root@gengqi:~/tmp# /root/llvm-master/build/bin/llvm-tblgen --print-records bugcond.td
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /root/llvm-master/build/bin/llvm-tblgen --print-records bugcond.td
 #0 0x0000555555a52484 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /root/llvm-master/llvm/lib/Support/Unix/Signals.inc:565:22
 #1 0x0000555555a5253f PrintStackTraceSignalHandler(void*) /root/llvm-master/llvm/lib/Support/Unix/Signals.inc:632:1
 #2 0x0000555555a501a6 llvm::sys::RunSignalHandlers() /root/llvm-master/llvm/lib/Support/Signals.cpp:97:20
 #3 0x0000555555a51dd0 SignalHandler(int) /root/llvm-master/llvm/lib/Support/Unix/Signals.inc:407:1
 #4 0x00007ffff7fb13c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #5 0x0000555555a8985d llvm::UnOpInit::Fold(llvm::Record*, bool) const /root/llvm-master/llvm/lib/TableGen/Record.cpp:800:60
 #6 0x0000555555a8a003 llvm::UnOpInit::resolveReferences(llvm::Resolver&) const /root/llvm-master/llvm/lib/TableGen/Record.cpp:867:49
 #7 0x0000555555a877ea llvm::BitsInit::resolveReferences(llvm::Resolver&) const /root/llvm-master/llvm/lib/TableGen/Record.cpp:471:66
 #8 0x0000555555a93dd5 llvm::Record::resolveReferences(llvm::Resolver&, llvm::RecordVal const*) /root/llvm-master/llvm/lib/TableGen/Record.cpp:2386:38
 #9 0x0000555555ac5a48 llvm::TGParser::AddSubClass(llvm::Record*, llvm::SubClassReference&) /root/llvm-master/llvm/lib/TableGen/TGParser.cpp:276:68
#10 0x0000555555ad270f llvm::TGParser::ParseObjectBody(llvm::Record*) /root/llvm-master/llvm/lib/TableGen/TGParser.cpp:2998:7
#11 0x0000555555ad2974 llvm::TGParser::ParseDef(llvm::MultiClass*) /root/llvm-master/llvm/lib/TableGen/TGParser.cpp:3035:3
#12 0x0000555555ad599b llvm::TGParser::ParseObject(llvm::MultiClass*) /root/llvm-master/llvm/lib/TableGen/TGParser.cpp:3697:42
#13 0x0000555555ad5b78 llvm::TGParser::ParseObjectList(llvm::MultiClass*) /root/llvm-master/llvm/lib/TableGen/TGParser.cpp:3724:5
#14 0x0000555555ad5bc6 llvm::TGParser::ParseFile() /root/llvm-master/llvm/lib/TableGen/TGParser.cpp:3732:3
#15 0x0000555555a81297 llvm::TableGenMain(char const*, bool (*)(llvm::raw_ostream&, llvm::RecordKeeper&)) /root/llvm-master/llvm/lib/TableGen/Main.cpp:116:3
#16 0x0000555555931196 main /root/llvm-master/llvm/utils/TableGen/TableGen.cpp:285:22
#17 0x00007ffff7a550b3 __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#18 0x000055555557511e _start (/root/llvm-master/build/bin/llvm-tblgen+0x2111e)
Segmentation fault (core dumped)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFl0uTmzgQgH8NvqhM6cHz4IPn4ezWJpXZGWdrby4BMmYXA5FEYv_7tAS2gYmTTHZSi10gJNH9dasltZI6Oy6cAKclVwo9yHpblMJht0mh0cGht8gUjg67R0544-A7By-RrTsckMPuoA8bVR-Ptvp4rnbCu75g75nYogdCoNNyoI2AJgJKzl_ZbhhPumHohofdunvHvl5Dj74vap4TK6PHfI2kyMfUpomalu1eT2QjVApt6q1ZDiVpXWUOjaAkPsKzcQ_WTWBBbGlBqcG0SkwRzIc_vT2Jm15atsJ-yEDCRPlXfHe7Nj_7QWcweea3u7X5Dbrgsc8CPBQq61o7Hs5FlX8s4BsnvHfoSu8bhzKwd2Xb6aosP-3ne660kPCWtEWZmWdRndp0UoIMNJ83sqj0XIq0lplCSZsbj7k669Q9vL1fPt0j1SZ7iBZu2sFVTS010jXaad0oA0FX8M8LvWsTN633vZKTrkbW_4jUYBVKtUJBAfEqQ0WVlm0mkN4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