[llvm] [AArch64] Consider [u/s]itofp SVE packing costs (PR #225352)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 03:14:12 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64

@llvm/pr-subscribers-llvm-analysis

Author: Jack Styles (Stylie777)

<details>
<summary>Changes</summary>

When using uitofp/sitofp with SVE instructions on fixed VF's the vector will need unpacking into the equivalent SVE vector. Upto now, the cost of this was not considered in the LoopVectorizer, only he cost of the FCVT. Add these costs when using SVE Vectors on a fixed VF.

The same can be applied for the reverse when using fptosi or fptoui as there will need to be packing operations to the types to be changed.

---
Full diff: https://github.com/llvm/llvm-project/pull/225352.diff


2 Files Affected:

- (modified) llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (+61-17) 
- (modified) llvm/test/Analysis/CostModel/AArch64/sve-cast.ll (+204-204) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


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


More information about the llvm-commits mailing list