[llvm] [AArch64] AArch64TargetLowering::computeKnownBitsForTargetNode - add support for AArch64ISD::MOV/MVN constants (PR #154039)

Yatao Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 12:54:13 PDT 2025


================
@@ -30624,6 +30650,10 @@ bool AArch64TargetLowering::isTargetCanonicalConstantNode(SDValue Op) const {
   return Op.getOpcode() == AArch64ISD::DUP ||
          Op.getOpcode() == AArch64ISD::MOVI ||
          Op.getOpcode() == AArch64ISD::MOVIshift ||
----------------
ningxinr wrote:

> Do you have to handle a bitcast/nvcast as well from int to fp?

I finally figured this one out. You were right, it should be a MOVIedit instead of a MOVI, hence it doesn't need the NVCAST. Thanks for catching this! 

https://github.com/llvm/llvm-project/pull/154039


More information about the llvm-commits mailing list