1 // RUN: %clang_cc1 -std=c++1z -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
5 // CHECK: %[[A:.*]] = alloca i32, align 4
6 // CHECK-NEXT: store i32 5, ptr %[[A]], align 4
7 // CHECK-NEXT: %[[B:.*]] = load i32, ptr %[[A]], align 4
8 // CHECK-NEXT: %[[C:.*]] = icmp slt i32 %[[B]], 8
14 // CHECK: %[[A:.*]] = alloca i32, align 4
15 // CHECK-NEXT: %[[B:.*]] = alloca i32, align 4
16 // CHECK-NEXT: %[[C:.*]] = alloca i32, align 4
17 // CHECK-NEXT: store i32 5, ptr %[[B]], align 4
18 // CHECK-NEXT: store i32 7, ptr %[[C]], align 4
19 if (int a
, b
= 5; int c
= 7)
24 // CHECK: %[[A:.*]] = alloca i32, align 4
25 // CHECK-NEXT: %[[B:.*]] = call noundef i32 @_Z2f2v()
26 // CHECK-NEXT: store i32 7, ptr %[[A]], align 4
27 // CHECK-NEXT: %[[C:.*]] = load i32, ptr %[[A]], align 4
28 // CHECK-NEXT: %[[D:.*]] = icmp ne i32 %[[C]], 0
29 if (T
{f2()}; int c
= 7)
35 // CHECK: %[[A:.*]] = alloca i32, align 4
36 // CHECK-NEXT: store i32 5, ptr %[[A]], align 4
37 // CHECK-NEXT: %[[B:.*]] = load i32, ptr %[[A]], align 4
38 // CHECK-NEXT: switch i32 %[[B]], label %[[C:.*]] [
39 switch (int a
= 5; a
) {
46 // CHECK: %[[A:.*]] = alloca i32, align 4
47 // CHECK-NEXT: %[[B:.*]] = alloca i32, align 4
48 // CHECK-NEXT: %[[C:.*]] = alloca i32, align 4
49 // CHECK-NEXT: store i32 5, ptr %[[B]], align 4
50 // CHECK-NEXT: store i32 7, ptr %[[C]], align 4
51 // CHECK-NEXT: %[[D:.*]] = load i32, ptr %[[C]], align 4
52 // CHECK-NEXT: switch i32 %[[D]], label %[[E:.*]] [
53 switch (int a
, b
= 5; int c
= 7) {
60 // CHECK: %[[A:.*]] = alloca i32, align 4
61 // CHECK-NEXT: %[[B:.*]] = call noundef i32 @_Z2f2v()
62 // CHECK-NEXT: store i32 7, ptr %[[A]], align 4
63 // CHECK-NEXT: %[[C:.*]] = load i32, ptr %[[A]], align 4
64 // CHECK-NEXT: switch i32 %[[C]], label %[[E:.*]] [
65 switch (T
{f2()}; int c
= 7) {