[llvm] Add FeatureFuseLiterals as SubTargetFeature for Grace and Olympus (PR #160257)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 30 03:35:20 PDT 2025
================
@@ -12564,6 +12564,17 @@ bool AArch64TargetLowering::isOffsetFoldingLegal(
bool AArch64TargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
bool OptForSize) const {
+ // If the constant to be materialized is scalar, it maybe efficient to use
+ // sequence of 'mov + fmov' rather than 'adrp + ldr' on specified CPU's.
+ // However, when materializing vector of constants, there are two things to
+ // note:
+ // 1. Throughput of fmov instruction is very low.
+ // 2. ldr instruction can load multiple constants in one go. Also, it's
+ // throughput is higher as compared to fmov.
----------------
sushgokh wrote:
> "fmovs limit throughput, loads are great".
We want to be cautious when we are materializing vector of constants. So, I have used "maybe more efficient" to describe that we are pessimistic here.
https://github.com/llvm/llvm-project/pull/160257
More information about the llvm-commits
mailing list