1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.14.0 -fsanitize=unsigned-integer-overflow %s -emit-llvm -o - | FileCheck %s
3 _Atomic(unsigned) atomic
;
5 // CHECK-LABEL: define{{.*}} void @cmpd_assign
6 void cmpd_assign(void) {
7 // CHECK: br label %[[LOOP_START:.*]]
9 // CHECK: [[LOOP_START]]:
10 // CHECK-NEXT: phi i32 {{.*}}, [ {{.*}}, %[[INCOMING_BLOCK:.*]] ]
12 // CHECK: [[INCOMING_BLOCK]]:
13 // CHECK-NEXT: cmpxchg
14 // CHECK-NEXT: extractvalue
15 // CHECK-NEXT: extractvalue
16 // CHECK-NEXT: br i1 %8, label %{{.*}}, label %[[LOOP_START]]
20 // CHECK-LABEL: define{{.*}} void @inc
22 // CHECK: br label %[[LOOP_START:.*]]
24 // CHECK: [[LOOP_START]]:
25 // CHECK-NEXT: phi i32 {{.*}}, [ {{.*}}, %[[INCOMING_BLOCK:.*]] ]
27 // CHECK: [[INCOMING_BLOCK]]:
28 // CHECK-NEXT: cmpxchg
29 // CHECK-NEXT: extractvalue
30 // CHECK-NEXT: extractvalue
31 // CHECK-NEXT: br i1 %8, label %{{.*}}, label %[[LOOP_START]]