[llvm] [AArch64] AArch64TargetLowering::computeKnownBitsForTargetNode - add support for AArch64ISD::MOV/MVN constants (PR #154039)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 01:25:00 PDT 2025
https://github.com/davemgreen commented:
Hello. AArch64 doesn't have way to generate `splat(0x8000000000000000)` in a single instruction. We can either generate `fmov(mov i64 0x8000000000000000)` or use fneg to do `fneg(movi 0x0)`. There is not a lot in it, but the fmov from gpr->fpr is quite expensive so we prefer the fneg version. See #80641 and TryWithFNeg, which can apply to any constant that can be materialized with a fneg, although it looks like most of the other cases are OK.
It will usually look like `fneg(nvcast(movi))`, but in this particular case the nvcast is removed as both types are f64.
https://github.com/llvm/llvm-project/pull/154039
More information about the llvm-commits
mailing list