Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Edit codegen test case for llvm/test/CodeGen/RISCV/rvv/{vnclip.ll/vnclipu.ll} correctly.
llvm/include/llvm/IR/IntrinsicsRISCV.td | ||
---|---|---|
697 | Something I just noticed today. I think we can use LLVMExtendedType<0> instead of llvm_any_vector_ty for the second input operand to make it automatically 2x the element width of the output. Does that simplify the frontend much if we don't need to use an extra IntrinsicType? It would be a separate patch of course if we did it. |
llvm/include/llvm/IR/IntrinsicsRISCV.td | ||
---|---|---|
697 | This won't affect the front-end. C intrinsics are directly lowered into LLVM intrinsics here. |
Is there a way to detect whether the compiler already includes this change, preferably via preprocessor?
I tried #ifdef __RISCV_VXRM_RDN and #if __has_builtin(__RISCV_VXRM_RDN).
This is a breaking change for us. Updating code to the new required signature fails to compile on the older toolchain (which is still in use). Leaving the code in the old style (no extra VXRM argument) is also not an option because other users have already updated their LLVM.
Hi Jan,
Thanks for checking. I was planning to bump the version number of the RVV intrinsics [0] in the next LLVM release for users to identify what version of intrinsics they are using. My fault for not being aware that projects may be using the trunk upstream compiler.
Temporarily, I can add an indicator for users to identify this breaking change, however the new LLVM branch out is coming on July 4th, so I personally think we should just bump the version number for the next LLVM release.
If this is a really urgent issue, lets discuss more.
[0] https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/RISCV.cpp#L200
Thanks for your quick reply. Yes, we are tracking trunk with a short lag, and unfortunately this is mostly beyond our control.
Now that I have updated the Highway code and toolchain reference in user code, we are fine for the moment.
Please do update the intrinsics version number when there is a breaking change, though :)
I think we if we used LLVMTruncatedType<0> in IntrinsicsRISCV.td we wouldn't need to pass to Ops[Offset]->getType() here. Which I think makes this code identical to the sadd ManualCodegen?