[PATCH] D67686: Fix compile-time regression caused by rL371928

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 10:49:13 PDT 2019


dsanders added a comment.

In D67686#1673591 <https://reviews.llvm.org/D67686#1673591>, @jmolloy wrote:

> Thankyou Daniel! Looks great!
>
> One question though, how did your out-of-tree backend trigger this case? It only gets enabled with BitWidth > 64 which was totally not supported before, so surely you would have had a broken encoder?
>
> Cheers,
>
> James


Thanks.

Historically, we let tablegen give us the first 64-bits and then tacked on extra bytes via handwritten C++ (which is as error prone as you'd expect). A while back we made Inst field reflect the whole instruction and added >64-bit support to the disassembler but we didn't have time to do the encoder at the same time. We therefore added a quick hack to have the CodeEmitterGen discard the definition for bit 64 and up and filed a bug report to come back to it. The end result was that when your patch landed we got the APInt version because BitWidth was >64 in the early test but it still only generated the first 64-bits because of our hack. The next step for us now that we've updated our MCCodeEmitter to the APInt versions is to remove our hack and let tblgen handle it all :-)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67686/new/

https://reviews.llvm.org/D67686





More information about the llvm-commits mailing list