[PATCH] D99057: [TableGen] Allow BitsInit to init integer in pseudo expansion

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 22:56:27 PDT 2021


sepavloff added inline comments.


================
Comment at: llvm/utils/TableGen/PseudoLoweringEmitter.cpp:113
+      auto II = dyn_cast<IntInit>(BI->convertInitializerTo(IntRecTy::get()));
+      assert(II && "Cannot convert to integer initializer");
+      OperandMap[BaseIdx + i].Kind = OpData::Imm;
----------------
craig.topper wrote:
> Just use a cast instead of checking dyn_cast with an assert.
Thank you!
Fixed in https://reviews.llvm.org/rGcf0f2884a1d9


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99057



More information about the llvm-commits mailing list