[llvm] [RISCV][ISEL] Lowering to load-acquire/store-release for RISCV Zalasr (PR #82914)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 15 00:23:13 PST 2024
================
@@ -21926,6 +21926,35 @@ unsigned RISCVTargetLowering::getCustomCtpopCost(EVT VT,
return isCtpopFast(VT) ? 0 : 1;
}
+bool RISCVTargetLowering::shouldInsertFencesForAtomic(
+ const Instruction *I) const {
+ if (Subtarget.hasStdExtZalasr()) {
+ if (Subtarget.hasStdExtZtso()) {
+ // Zalasr + TSO means that atomic_load_acquire and atomic_store_release
+ // should be lowered to plain load/store. The easiest way to do this is
----------------
topperc wrote:
Only one space after `//`
https://github.com/llvm/llvm-project/pull/82914
More information about the llvm-commits
mailing list