Skip to content
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

[RISCV] Add riscv_atomic.h and Zawrs/Zalrsc builtins #94578

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions clang/include/clang/Basic/BuiltinsRISCV.td
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,21 @@ let Features = "zihintntl", Attributes = [CustomTypeChecking] in {
def ntl_load : RISCVBuiltin<"void(...)">;
def ntl_store : RISCVBuiltin<"void(...)">;
} // Features = "zihintntl", Attributes = [CustomTypeChecking]

//===----------------------------------------------------------------------===//
// Zawrs extension.
//===----------------------------------------------------------------------===//
let Features = "zawrs" in {
def wrs_nto : RISCVBuiltin<"void()">;
def wrs_sto : RISCVBuiltin<"void()">;
} // Features = "zawrs"

//===----------------------------------------------------------------------===//
// Zalrsc extension.
//===----------------------------------------------------------------------===//
let Features = "zalrsc" in {
def lr_w : RISCVBuiltin<"int(int *, _Constant unsigned int)">;
def lr_d : RISCVBuiltin<"int64_t(int64_t *, _Constant unsigned int)">;
def sc_w : RISCVBuiltin<"int(int, int *, _Constant unsigned int)">;
def sc_d : RISCVBuiltin<"int64_t(int64_t, int64_t *, _Constant unsigned int)">;
} // Features = "zalrsc"
22 changes: 22 additions & 0 deletions clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21792,6 +21792,28 @@ Value *CodeGenFunction::EmitRISCVBuiltinExpr(unsigned BuiltinID,
ID = Intrinsic::riscv_sm3p1;
break;

// Zawrs
case RISCV::BI__builtin_riscv_wrs_nto:
ID = Intrinsic::riscv_wrs_nto;
break;
case RISCV::BI__builtin_riscv_wrs_sto:
ID = Intrinsic::riscv_wrs_sto;
break;

// Zalrsc
case RISCV::BI__builtin_riscv_lr_w:
ID = Intrinsic::riscv_lr_w;
break;
case RISCV::BI__builtin_riscv_lr_d:
ID = Intrinsic::riscv_lr_d;
break;
case RISCV::BI__builtin_riscv_sc_w:
ID = Intrinsic::riscv_sc_w;
break;
case RISCV::BI__builtin_riscv_sc_d:
ID = Intrinsic::riscv_sc_d;
break;

// Zihintntl
case RISCV::BI__builtin_riscv_ntl_load: {
llvm::Type *ResTy = ConvertType(E->getType());
Expand Down
1 change: 1 addition & 0 deletions clang/lib/Headers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ set(ppc_htm_files
)

set(riscv_files
riscv_atomic.h
riscv_bitmanip.h
riscv_crypto.h
riscv_ntlh.h
Expand Down
36 changes: 36 additions & 0 deletions clang/lib/Headers/riscv_atomic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*===---- riscv_atomic.h - RISC-V atomic intrinsics ------------------------===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
*===-----------------------------------------------------------------------===
*/

#ifndef __RISCV_ATOMIC_H
#define __RISCV_ATOMIC_H

#ifdef __riscv_zalrsc
enum {
__RISCV_ORDERING_NONE = 0,
__RISCV_ORDERING_AQ = 1,
__RISCV_ORDERING_RL = 2,
__RISCV_ORDERING_AQ_RL = 3
};

#define __riscv_lr_w __builtin_riscv_lr_w
#define __riscv_sc_w __builtin_riscv_sc_w

#if __riscv_xlen == 64
#define __riscv_lr_d __builtin_riscv_lr_d
#define __riscv_sc_d __builtin_riscv_sc_d
#endif

#endif

#ifdef __riscv_zawrs
#define __riscv_wrs_nto __builtin_riscv_wrs_nto
#define __riscv_wrs_sto __builtin_riscv_wrs_sto
#endif

#endif
10 changes: 9 additions & 1 deletion clang/lib/Sema/SemaRISCV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ bool SemaRISCV::CheckBuiltinFunctionCall(const TargetInfo &TI,
case RISCVVector::BI__builtin_rvv_vfwnmsac_vf_rm_mu:
return SemaRef.BuiltinConstantArgRange(TheCall, 4, 0, 4);
case RISCV::BI__builtin_riscv_ntl_load:
case RISCV::BI__builtin_riscv_ntl_store:
case RISCV::BI__builtin_riscv_ntl_store: {
DeclRefExpr *DRE =
cast<DeclRefExpr>(TheCall->getCallee()->IgnoreParenCasts());
assert((BuiltinID == RISCV::BI__builtin_riscv_ntl_store ||
Expand Down Expand Up @@ -1368,6 +1368,14 @@ bool SemaRISCV::CheckBuiltinFunctionCall(const TargetInfo &TI,
return false;
}

case RISCV::BI__builtin_riscv_lr_w:
case RISCV::BI__builtin_riscv_lr_d:
return SemaRef.BuiltinConstantArgRange(TheCall, 1, 0, 3);
case RISCV::BI__builtin_riscv_sc_w:
case RISCV::BI__builtin_riscv_sc_d:
return SemaRef.BuiltinConstantArgRange(TheCall, 2, 0, 3);
}

return false;
}

Expand Down
13 changes: 13 additions & 0 deletions clang/test/CodeGen/RISCV/atomics-intrinsics/zalrsc-error.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// REQUIRES: riscv-registered-target
// RUN: %clang_cc1 -triple riscv64 -target-feature +zalrsc -S -verify %s -o -
// RUN: %clang_cc1 -triple riscv64 -target-feature +zalrsc -S -verify %s -o -

#include <riscv_atomic.h>

int zalrsc_lr_w(int* ptr) {
return __riscv_lr_w(ptr, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
}

int zalrsc_sc_w(int v, int* ptr) {
return __riscv_sc_w(v, ptr, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
}
222 changes: 222 additions & 0 deletions clang/test/CodeGen/RISCV/atomics-intrinsics/zalrsc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
// REQUIRES: riscv-registered-target
// RUN: %clang_cc1 -triple riscv32 -target-feature +zalrsc -disable-O0-optnone \
// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
// RUN: FileCheck --check-prefixes=CHECK-RV32 %s
// RUN: %clang_cc1 -triple riscv64 -target-feature +zalrsc -disable-O0-optnone \
// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
// RUN: FileCheck --check-prefix=CHECK-RV64 %s

#include <stdint.h>
#include <riscv_atomic.h>

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_lr_w_none
// CHECK-RV32-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0:[0-9]+]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 0)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_lr_w_none
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0:[0-9]+]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 0)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_lr_w_none(int* ptr) {
return __riscv_lr_w(ptr, __RISCV_ORDERING_NONE);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_lr_w_aq
// CHECK-RV32-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 1)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_lr_w_aq
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 1)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_lr_w_aq(int* ptr) {
return __riscv_lr_w(ptr, __RISCV_ORDERING_AQ);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_lr_w_rl
// CHECK-RV32-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 2)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_lr_w_rl
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 2)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_lr_w_rl(int* ptr) {
return __riscv_lr_w(ptr, __RISCV_ORDERING_RL);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_lr_w_aqrl
// CHECK-RV32-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 3)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_lr_w_aqrl
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.lr.w(ptr [[PTR]], i32 3)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_lr_w_aqrl(int* ptr) {
return __riscv_lr_w(ptr, __RISCV_ORDERING_AQ_RL);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_sc_w_none
// CHECK-RV32-SAME: (i32 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 0)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_sc_w_none
// CHECK-RV64-SAME: (i32 noundef signext [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 0)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_sc_w_none(int v, int* ptr) {
return __riscv_sc_w(v, ptr, __RISCV_ORDERING_NONE);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_sc_w_aq
// CHECK-RV32-SAME: (i32 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 1)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_sc_w_aq
// CHECK-RV64-SAME: (i32 noundef signext [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 1)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_sc_w_aq(int v, int* ptr) {
return __riscv_sc_w(v, ptr, __RISCV_ORDERING_AQ);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_sc_w_rl
// CHECK-RV32-SAME: (i32 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 2)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_sc_w_rl
// CHECK-RV64-SAME: (i32 noundef signext [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 2)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_sc_w_rl(int v, int* ptr) {
return __riscv_sc_w(v, ptr, __RISCV_ORDERING_RL);
}

// CHECK-RV32-LABEL: define dso_local i32 @zalrsc_sc_w_aqrl
// CHECK-RV32-SAME: (i32 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 3)
// CHECK-RV32-NEXT: ret i32 [[TMP0]]
//
// CHECK-RV64-LABEL: define dso_local signext i32 @zalrsc_sc_w_aqrl
// CHECK-RV64-SAME: (i32 noundef signext [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.sc.w(i32 [[V]], ptr [[PTR]], i32 3)
// CHECK-RV64-NEXT: ret i32 [[TMP0]]
//
int zalrsc_sc_w_aqrl(int v, int* ptr) {
return __riscv_sc_w(v, ptr, __RISCV_ORDERING_AQ_RL);
}

#if __riscv_xlen == 64
// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_lr_d_none
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.lr.d(ptr [[PTR]], i32 0)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_lr_d_none(int64_t* ptr) {
return __riscv_lr_d(ptr, __RISCV_ORDERING_NONE);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_lr_d_aq
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.lr.d(ptr [[PTR]], i32 1)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_lr_d_aq(int64_t* ptr) {
return __riscv_lr_d(ptr, __RISCV_ORDERING_AQ);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_lr_d_rl
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.lr.d(ptr [[PTR]], i32 2)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_lr_d_rl(int64_t* ptr) {
return __riscv_lr_d(ptr, __RISCV_ORDERING_RL);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_lr_d_aqrl
// CHECK-RV64-SAME: (ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.lr.d(ptr [[PTR]], i32 3)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_lr_d_aqrl(int64_t* ptr) {
return __riscv_lr_d(ptr, __RISCV_ORDERING_AQ_RL);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_sc_d_none
// CHECK-RV64-SAME: (i64 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.sc.d(i64 [[V]], ptr [[PTR]], i32 0)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_sc_d_none(int64_t v, int64_t* ptr) {
return __riscv_sc_d(v, ptr, __RISCV_ORDERING_NONE);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_sc_d_aq
// CHECK-RV64-SAME: (i64 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.sc.d(i64 [[V]], ptr [[PTR]], i32 1)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_sc_d_aq(int64_t v, int64_t* ptr) {
return __riscv_sc_d(v, ptr, __RISCV_ORDERING_AQ);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_sc_d_rl
// CHECK-RV64-SAME: (i64 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.sc.d(i64 [[V]], ptr [[PTR]], i32 2)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_sc_d_rl(int64_t v, int64_t* ptr) {
return __riscv_sc_d(v, ptr, __RISCV_ORDERING_RL);
}

// CHECK-RV64-LABEL: define dso_local i64 @zalrsc_sc_d_aqrl
// CHECK-RV64-SAME: (i64 noundef [[V:%.*]], ptr noundef [[PTR:%.*]]) #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: [[TMP0:%.*]] = call i64 @llvm.riscv.sc.d(i64 [[V]], ptr [[PTR]], i32 3)
// CHECK-RV64-NEXT: ret i64 [[TMP0]]
//
int64_t zalrsc_sc_d_aqrl(int64_t v, int64_t* ptr) {
return __riscv_sc_d(v, ptr, __RISCV_ORDERING_AQ_RL);
}

#endif
42 changes: 42 additions & 0 deletions clang/test/CodeGen/RISCV/atomics-intrinsics/zawrs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
// REQUIRES: riscv-registered-target
// RUN: %clang_cc1 -triple riscv32 -target-feature +zawrs -disable-O0-optnone \
// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
// RUN: FileCheck --check-prefixes=CHECK-RV32 %s
// RUN: %clang_cc1 -triple riscv64 -target-feature +zawrs -disable-O0-optnone \
// RUN: -emit-llvm %s -o - | opt -S -passes=mem2reg | \
// RUN: FileCheck --check-prefix=CHECK-RV64 %s

#include <riscv_atomic.h>

// CHECK-RV32-LABEL: define dso_local void @zawrs_nto
// CHECK-RV32-SAME: () #[[ATTR0:[0-9]+]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: call void @llvm.riscv.wrs.nto()
// CHECK-RV32-NEXT: ret void
//
// CHECK-RV64-LABEL: define dso_local void @zawrs_nto
// CHECK-RV64-SAME: () #[[ATTR0:[0-9]+]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: call void @llvm.riscv.wrs.nto()
// CHECK-RV64-NEXT: ret void
//
void zawrs_nto(){
__riscv_wrs_nto();
}

// CHECK-RV32-LABEL: define dso_local void @zawrs_sto
// CHECK-RV32-SAME: () #[[ATTR0]] {
// CHECK-RV32-NEXT: entry:
// CHECK-RV32-NEXT: call void @llvm.riscv.wrs.sto()
// CHECK-RV32-NEXT: ret void
//
// CHECK-RV64-LABEL: define dso_local void @zawrs_sto
// CHECK-RV64-SAME: () #[[ATTR0]] {
// CHECK-RV64-NEXT: entry:
// CHECK-RV64-NEXT: call void @llvm.riscv.wrs.sto()
// CHECK-RV64-NEXT: ret void
//
void zawrs_sto(){
__riscv_wrs_sto();
}
Loading
Loading