[PATCH] D137108: Implement support for AArch64ISD::MOVI in computeKnownBits
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 1 02:42:52 PDT 2022
dmgreen added a comment.
Sounds like a good use of isTargetCanonicalConstantNode.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1977
+ ConstantSDNode *CN = cast<ConstantSDNode>(Op->getOperand(0));
+ assert(CN && "Expect MOVI operand to be ConstantSDNode");
+ Known =
----------------
cast<> will already assert.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1979
+ Known =
+ KnownBits::makeConstant(APInt(Known.getBitWidth(), CN->getZExtValue()));
+ break;
----------------
Does CN->getAPIntValue() work, or does it need to change the width of the APInt?
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