| // (due to not having native load atomic support) |
| // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s |
| // RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm %s -o - | FileCheck %s |
| // Check that multiply / divides on atomics produce a cmpxchg loop |
| // CHECK: {{(cmpxchg i32*|i1 @__atomic_compare_exchange\(i32 4,)}} |
| // CHECK: {{(cmpxchg i32*|i1 @__atomic_compare_exchange\(i32 4, )}} |
| // CHECK: {{(cmpxchg i16*|i1 @__atomic_compare_exchange\(i32 2, )}} |
| // CHECK: %[[load:.*]] = load atomic i8, i8* @b seq_cst |
| // CHECK: %[[tobool:.*]] = trunc i8 %[[load]] to i1 |
| // CHECK: ret i1 %[[tobool]] |
| extern _Atomic(_Complex int) x; |
| // CHECK: {{store atomic|call void @__atomic_store}} |