-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV] Support floating point VCIX #67094
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target is support LLVM IR part only, we would like to prevent expose that on the C intrinsic level if possible, because that's intentionally to expose vector with unsigned integer only.
Sure~ |
c6d4731
to
159f313
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
159f313
to
81b724a
Compare
; CHECK-NEXT: sf.vc.xv 3, 31, v8, a0 | ||
; CHECK-NEXT: ret | ||
entry: | ||
tail call void @llvm.riscv.sf.vc.xv.se.iXLen.nxv1f16.i16.iXLen(iXLen 3, iXLen 31, <vscale x 1 x half> %vs2, i16 %rs1, iXLen %vl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to support integer scalars with FP vectors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's VCIX which could let user define what they want...which means it's also possible to design some function take an integer with floating point vector value, so I would say it possible, and support that on the LLVM IR only is harmless and not costly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch increased the size of the isel table by 33K or 1.5%.
VCIX could also have an instruction that takes an FP vector and returns an int vector or vice versa, but we don't support that. So what is our criteria for what we support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, okay, I got your point, I am thinking does it possible to convert those intrinsic to integer variant during lowering instead of expanding those combination in td?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's a good idea, we just convert all floating point vector to integer vector during lowering, that can reduce the effort to create all of iteration in td file and also it could increase much size of isel table.
No description provided.