[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-27 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-27 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-27 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/77560 >From 08371002a08d8958cd23eecb5ff3c5f2f2661c0e Mon Sep 17 00:00:00 2001 From: 4vtomat Date: Wed, 22 Mar 2023 22:58:35 -0700 Subject: [PATCH] [RISCV] RISCV vector calling convention (1/2) This is the vector

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-27 Thread Brandon Wu via cfe-commits
4vtomat wrote: Rebase and squash https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-18 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-05 Thread Brandon Wu via cfe-commits
@@ -3439,6 +3439,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) { case CC_PreserveAll: return "preserve_all"; case CC_M68kRTD: return "m68k_rtd"; case CC_PreserveNone: return "preserve_none"; + case CC_RISCVVectorCall: 4vtomat wrote:

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-05 Thread Craig Topper via cfe-commits
@@ -3439,6 +3439,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) { case CC_PreserveAll: return "preserve_all"; case CC_M68kRTD: return "m68k_rtd"; case CC_PreserveNone: return "preserve_none"; + case CC_RISCVVectorCall: topperc wrote:

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-05 Thread Craig Topper via cfe-commits
@@ -74,6 +74,8 @@ unsigned CodeGenTypes::ClangCallConvToLLVMCallConv(CallingConv CC) { case CC_SwiftAsync: return llvm::CallingConv::SwiftTail; case CC_M68kRTD: return llvm::CallingConv::M68k_RTD; case CC_PreserveNone: return llvm::CallingConv::PreserveNone; + case

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-02 Thread Brandon Wu via cfe-commits
4vtomat wrote: > I tried compiling it and then got two warnings. > > ``` > llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp:1408:11: warning: enumeration > value 'CC_RISCVVectorCall' not handled in switch [-Wswitch] > 1408 | switch (CC) { > | ^~ > 1 warning generated. >

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-02-29 Thread Shao-Ce SUN via cfe-commits
sunshaoce wrote: I tried compiling it and then got two warnings. ``` llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp:1408:11: warning: enumeration value 'CC_RISCVVectorCall' not handled in switch [-Wswitch] 1408 | switch (CC) { | ^~ 1 warning generated. [3629/3776] Building

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-02-29 Thread Brandon Wu via cfe-commits
4vtomat wrote: ping https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-02-20 Thread Brandon Wu via cfe-commits
4vtomat wrote: Rebase https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-02-06 Thread Brandon Wu via cfe-commits
4vtomat wrote: The latest fixup commit add [[riscv::riscv_vector]] supports for C23 and C++11. https://github.com/llvm/llvm-project/pull/77560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-01-22 Thread Craig Topper via cfe-commits
@@ -692,8 +692,71 @@ define <16 x i64> @fshr_v16i64(<16 x i64> %a, <16 x i64> %b, <16 x i64> %c, <16 ; CHECK-NEXT:csrr a0, vlenb ; CHECK-NEXT:slli a0, a0, 3 ; CHECK-NEXT:add sp, sp, a0 +; CHECK-NEXT:.cfi_def_cfa sp, 16 ; CHECK-NEXT:addi sp, sp, 16 ;

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-01-22 Thread Craig Topper via cfe-commits
@@ -1006,15 +1077,24 @@ RISCVFrameLowering::assignRVVStackObjectOffsets(MachineFunction ) const { MachineFrameInfo = MF.getFrameInfo(); // Create a buffer of RVV objects to allocate. SmallVector ObjectsToAllocate; - for (int I = 0, E = MFI.getObjectIndexEnd(); I != E;

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-01-22 Thread Craig Topper via cfe-commits
@@ -0,0 +1,27 @@ +// REQUIRES: riscv-registered-target +// RUN: %clang_cc1 -triple riscv64 -target-feature +v \ +// RUN: -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-LLVM %s + +#include + +// CHECK-LLVM: call riscv_vector_cc @bar +vint32m1_t