-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[RISC-V] llvm.vp.select: Unexpected subvector extraction #59252
Comments
@llvm/issue-subscribers-backend-risc-v |
I think the issue is that vscale_range has been set to 4 and vector.insert is being used to insert v8i32 vectors into nxv2i32 vectors without also putting +zvl256b in the target-features. So we have a disagreement about the minimum size of scalable vectors. |
@topperc, thanks, with |
I'm inclined to say it's a problem in your code generator. clang uses the Zvlb extensions to set the vscale_range. All of the backend code uses the Zvlb extension as well and not vscale_range. In your case you're setting vscale_range without setting Zvl*b. Fixing this in LLVM might be possible by using vscale_range instead of Zvl*b in the backend. Or the larger of the two, but I'm not sure. |
I'm working on a patch to make this work.(I need it for other reasons). But I noticed the IR uses |
@topperc, thank you kindly. I'll keep on touch to test your solution. |
Command which I use on test_llvm.ll:
BTW, There is no overload with a mask for
llvm.vp.select
: https://llvm.org/docs/LangRef.html#llvm-vp-select-intrinsics. Can it help solve the problem?The text was updated successfully, but these errors were encountered: