[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

Kito Cheng via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 05:57:31 PST 2024


================
@@ -32,3 +36,39 @@ vint32m1_t test_no_vector_cc_attr(vint32m1_t input, int32_t *base, size_t vl) {
   __riscv_vse32_v_i32m1(base, val, vl);
   return ret;
 }
+
+// CHECK-LLVM: define dso_local void @test_vls_no_cc(i128 noundef %arg.coerce)
+// CHECK-LLVM-ABI-VLEN: define dso_local void @test_vls_no_cc(<vscale x 1 x i32> noundef %arg.coerce)
+void test_vls_no_cc(__attribute__((vector_size(16))) int arg) {}
----------------
kito-cheng wrote:

This should keep passed by `i128` because no `riscv_vls_cc`? I assume `-mriscv-abi-vlen` should only impact those function declare with `riscv_vls_cc`?

https://github.com/llvm/llvm-project/pull/100346


More information about the cfe-commits mailing list