[CIR][CodeGen][Builtin] Handle remaining LLVM intrinsic type descriptors (`llvm::Intrinsic::IITDescriptor`)
Minimized test case:
#include <emmintrin.h>
int A() { __m128 h = _mm_srli_epi16(h, 0); }
Failed assertion: https://github.com/llvm/clangir/blob/aeac352c9de907fcbb7adde22bbe4a7cfa3105be/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp#L484
Flags: -fclangir -O2
Hi,
I'm interested in getting involved in the clangir project and have some experience with MLIR and LLVM. Are these tasks open for anyone to pick up, and could I try assigning it to myself and start working on them as a way of getting familiar with clangir codebase?
Hi @anirudhsundar! yes, issues are free for the taking. This one should be a good way to get started with the project. Let me know if you have any questions.
@tommymcm Thanks for the reply. I'd like to take a stab at this issue. I'm unable to assign the issue to myself, so I'll use this comment as a way of mentioning that.
Hi @tommymcm,
I added support for vector type based on the test case above and got it working, but the issue is titled "Handle remaining LLVM intrinsic type descriptors", so I'm guessing the task is to add support for all the other types.
Do you have any suggestion on where I could find test cases to reproduce the missing types? I can only see intrinsics that are architecture specific and that might show NYI for the missing architecture specific intrinsic functions.
Thanks
Hi @anirudhsundar there should be a matching function in the original (OG) clang codegen under clang/lib/CodeGen that you can use as a reference. If you want to handle the obvious ones for a first PR, could you also add all of the missing case branches (so there won't be a default anymore), and add an nyi assertion for each it would make it easier to handle each one as we need it in the future.
I added support for vector type based on the test case above and got it working
This is a good start, put that PR up first - like @tommymcm said, use NYIs where needed and make incremental progress! Thanks for looking at this