[PATCH] D137108: Implement support for AArch64ISD::MOVI in computeKnownBits

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 07:40:14 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1976
+  case AArch64ISD::MOVI: {
+    ConstantSDNode *CN = cast<ConstantSDNode>(Op->getOperand(0));
+    assert(CN && "Expect MOVI operand to be ConstantSDNode");
----------------
tschuett wrote:
> tschuett wrote:
> > Could you you change it to `dyn_cast` with if to get the correct assert and error message?
> I still believe that you need and `if` to check in Release mode whether it really is a constant node.
No, just use cast<> and remove the assert.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137108



More information about the llvm-commits mailing list