[llvm] Add FeatureFuseLiterals as SubTargetFeature for Grace and Olympus (PR #160257)

Sushant Gokhale via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 03:13:57 PDT 2025


sushgokh wrote:

>but whether a load or movk+fmov is used for materializing a fp constant? fmov has a limited bandwidth so should be avoided, but in load-heavy code (or where a load blocks other transforms, as it sounds like is happening here) the movks might be quicker.

You are right about `adrp+load`   sequence being replaced by sequence of 'movk+fmov'. For the code concerned, movk instructions are lot  cheaper

>Can we fix that directly? Either by changing how constants are materialized or making is so there isn't the load in the entry block of whatever function is causing the problem?

1. Either by changing how constants are materialized - this is the feature that enables this. I dont know any other way to do this.
2. there isn't the load in the entry block of whatever function is causing the problem - We have a load at start of BB followed by cmp/branch. Let me check if we can hoist that load.

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


More information about the llvm-commits mailing list