Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / blocks-seq.c
blobf3ecdaf3a43e1a4df4028fe93a9b4fa6e27fe40d
1 // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
2 // CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8
3 // CHECK: call i32 @rhs()
4 // CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, ptr [[Vi]], i32 0, i32 1
5 // CHECK: load ptr, ptr [[V7]]
6 // CHECK: call i32 @rhs()
7 // CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, ptr [[Vi]], i32 0, i32 1
8 // CHECK: load ptr, ptr [[V11]]
10 int rhs(void);
12 void foo(void) {
13 __block int i;
14 ^{ (void)i; };
15 i = rhs();
16 i += rhs();