diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGen/atomic_ops.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/atomic_ops.c b/clang/test/CodeGen/atomic_ops.c index 29009bef894..5f2a1966a2a 100644 --- a/clang/test/CodeGen/atomic_ops.c +++ b/clang/test/CodeGen/atomic_ops.c @@ -16,3 +16,13 @@ void foo(int x) // CHECK: {{(cmpxchg i16*|i1 @__atomic_compare_exchange\(i32 2, )}} } + +extern _Atomic _Bool b; + +_Bool bar() { +// CHECK-LABEL: @bar +// CHECK: %[[load:.*]] = load atomic i8* @b seq_cst, align 1 +// CHECK: %[[tobool:.*]] = trunc i8 %[[load]] to i1 +// CHECK: ret i1 %[[tobool]] + return b; +} |

