Skip to content

Conversation

@arcbbb
Copy link
Contributor

@arcbbb arcbbb commented Oct 29, 2025

In #160470, there is a discussion about the possibility to explored a general approach for handling memory intrinsics.

This patch adds alignment to IntrinsicCostAttributes for type-based cost queries used by SLP and Loop Vectorizer before IR is materialized.

Candidates to adopt this are getMaskedMemoryOpCost, getGatherScatterOpCost, getExpandCompressMemoryOpCost, and getStridedMemoryOpCost.

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@arcbbb arcbbb force-pushed the mem-intrinsic-cost branch from 7551383 to 47d0b7a Compare October 30, 2025 06:13
@arcbbb
Copy link
Contributor Author

arcbbb commented Oct 31, 2025

This approach doesn’t work for getGatherScatterOpCost: ARMTTIImpl::getGatherScatterOpCost walks the use chain of a provided LoadInst/StoreInst, whereas ICA currently expects an IntrinsicInst. Consider introducing getMemIntrinsicInstrCost to cover this scenario..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant