We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77913b5 commit 4581169Copy full SHA for 4581169
clang/test/CodeGen/atomic-ops-load.c
@@ -0,0 +1,11 @@
1
+// RUN: %clang_cc1 -triple riscv64 -O1 -emit-llvm %s -o - | FileCheck %s
2
+#include <stdbool.h>
3
+
4
+extern bool t1;
5
+bool test1(void) {
6
+// CHECK-LABEL: define{{.*}} i1 @test1
7
+// CHECK: load atomic i8, ptr @t1 monotonic, align 1
8
+// CHECK-NEXT: trunc i8 %{{.*}} to i1
9
+// CHECK-NEXT: ret i1 %{{.*}}
10
+ return __atomic_load_n(&t1, __ATOMIC_RELAXED);
11
+}
0 commit comments