================
@@ -0,0 +1,80 @@
+// RUN: %clang_cc1 -ast-dump %s | FileCheck %s
+// RUN: %clang_cc1 -ast-dump -fcuda-is-device %s | FileCheck %s
+// RUN: %clang_cc1 -ast-dump -fcuda-is-device %s \
+// RUN:   
-fatomic=no_fine_grained_memory:off,no_remote_memory:on,ignore_denormal_mode:on 
\
+// RUN:   | FileCheck %s
+
+#include "Inputs/cuda.h"
+
+// CHECK-LABEL: FunctionDecl {{.*}} test_default
+// CHECK: | |-CompoundStmt
+// CHECK-NOT: AtomicNoRemoteMemory
+// CHECK-NOT: AtomicNoFineGrainedMemory
+// CHECK-NOT: AtomicIgnoreDenormalMode
+__device__ __host__ void test_default(float *a) {
+  __scoped_atomic_fetch_add(a, 1, __ATOMIC_RELAXED, __MEMORY_SCOPE_SYSTEM);
+}
+
+// CHECK-LABEL: FunctionDecl {{.*}} test_one
+// CHECK: | |-CompoundStmt {{.*}} AtomicNoRemoteMemory=1
+// CHECK-NOT: AtomicNoFineGrainedMemory
----------------
arsenm wrote:

can you use positive checks for this 

https://github.com/llvm/llvm-project/pull/102569
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to