Debian Codegraph @

clang/test/CodeGen/atomic-ops-load.c

raw
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, !range ![[$WS_RANGE:[0-9]*]], !noundef !{{[0-9]+}}
8 // CHECK-NEXT: trunc nuw i8 %{{.*}} to i1
9 // CHECK-NEXT: ret i1 %{{.*}}
10 return __atomic_load_n(&t1, __ATOMIC_RELAXED);
11 }