[llvm] [NVPTX] Support for fence.acquire and fence.release (PR #124865)

Akshay Deodhar via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 12:54:04 PST 2025


================
@@ -0,0 +1,165 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+
+; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 -mattr=+ptx50 | FileCheck %s --check-prefix=SM30
+; RUN: %if ptxas %{ llc < %s -march=nvptx -mcpu=sm_30 -mattr=+ptx50 | %ptxas-verfy %}
+
+
+define void @fence_acquire_() {
+; SM30-LABEL: fence_acquire_(
+; SM30:       {
+; SM30-EMPTY:
+; SM30-EMPTY:
+; SM30-NEXT:  // %bb.0:
+; SM30-NEXT:    membar.sys;
+; SM30-NEXT:    ret;
+    fence syncscope("") acquire
+    ret void
+}
----------------
akshayrdeodhar wrote:

Makes sense to me- so we'll just have 3 different checks (SM30, SM70, SM90) for each fence, all together in the same file, right?

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


More information about the llvm-commits mailing list