Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no VP intrinsic version of llvm.stepvector? #121561

Open
wangpc-pp opened this issue Jan 3, 2025 · 3 comments
Open

There is no VP intrinsic version of llvm.stepvector? #121561

wangpc-pp opened this issue Jan 3, 2025 · 3 comments

Comments

@wangpc-pp
Copy link
Contributor

I think my memory has been messed up and I was thinking there should be an equal VP intrinsic for llvm.stepvector, but it seems not.

Remind me if I missed something. Why is there no such intrinsic? And do we need it?

@llvmbot
Copy link
Member

llvmbot commented Jan 3, 2025

@llvm/issue-subscribers-backend-risc-v

Author: Pengcheng Wang (wangpc-pp)

I think my memory has been messed up and I was thinking there should be an equal VP intrinsic for [`llvm.stepvector`](https://llvm.org/docs/LangRef.html#llvm-stepvector-intrinsic), but it seems not.

Remind me if I missed something. Why is there no such intrinsic? And do we need it?

@lukel97
Copy link
Contributor

lukel97 commented Jan 3, 2025

It only recently got promoted out of experimental IIRC, maybe that's why we don't already have a VP intrinsic

I don't see any reason why we shouldn't have one anyway, did you have a specific use case in mind for it?

@topperc
Copy link
Collaborator

topperc commented Jan 3, 2025

We haven't found a use for it yet in our downstream EVL vectorizer. I think I've only seen stepvector in the loop preheader where is no EVL yet. On some microarchitectures it might be profitable to use a vp.stepvector in the preheader if the total number of elements to process is less than VLMAX. Meaning the vector loop is a single iteration. If the microarcitecture dynamically reduces LMUL based on VL.

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

No branches or pull requests

4 participants