Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / capture-complex-expr-in-block.c
blob431740b8457b1d4f8b14761b36f0b48e72b60b6a
1 // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | FileCheck %s
3 typedef void (^BLOCK)(void);
4 int main (void)
6 _Complex double c;
7 BLOCK b = ^() {
8 _Complex double z;
9 z = z + c;
11 b();
14 // CHECK-LABEL: define internal void @__main_block_invoke
15 // CHECK: [[C1:%.*]] = alloca { double, double }, align 8
16 // CHECK: [[RP:%.*]] = getelementptr inbounds { double, double }, ptr [[C1]], i32 0, i32 0
17 // CHECK-NEXT: [[R:%.*]] = load double, ptr [[RP]]
18 // CHECK-NEXT: [[IP:%.*]] = getelementptr inbounds { double, double }, ptr [[C1]], i32 0, i32 1
19 // CHECK-NEXT: [[I:%.*]] = load double, ptr [[IP]]