-
Notifications
You must be signed in to change notification settings - Fork 159
[CIR][CIRGen][Builtin][Neon] Lower neon_vqmovns_s32 and add CIR PoisonAttr #1199
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
3dc47ce
to
7157833
Compare
Please introduce PoisonAttr, just like we have a UndefAttr (introduced by @smeenai). The idea is that such attribute could be used by both a full vector type or a regular type used in a vector lane, just like UndefAttr can. |
Sure, sounds best approach to me. let's do it. I'll create a vector type constantOP with thsi PoisonAttr, and it will become LLVM::PoisonOp after lowering. That CIR constant OP will be used as input to VecCreateOp, so we also change VecCreateOp lowering, so it won't generate initialization code during lowering when the input is poison constant. |
7ad1b26
to
3c21cec
Compare
Updated the PR using |
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.
Awesome, thanks for your patience!
…nAttr (#1199) CIR PoisonOp is needed in this context as alternative would be to use VecCreateOp to prepare an arg for VecInsertElement, but VecCreate is for different purpose and [it would insert all elements](https://github.com/llvm/clangir/blob/eacaabba76ebdbf87217fefaa77f92c45cf4509c/clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp#L1679) which is not totally unnecessary in this context. Here is the [intrinsic def ](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&q=vqmovns_)
CIR PoisonOp is needed in this context as alternative would be to use VecCreateOp to prepare an arg for VecInsertElement, but VecCreate is for different purpose and it would insert all elements which is not totally unnecessary in this context.
Here is the intrinsic def