summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-05-22 19:07:20 +0000
committerMike Stump <mrs@apple.com>2009-05-22 19:07:20 +0000
commitc63428b1921395bd06dbb8226eab833a0b2ce52a (patch)
treee0d933dc34be3edc82e0a0b78cf914e66f98001f /clang/test
parentadeeb052adb5d7411df25c23cb6eb05bcbc986bb (diff)
downloadbcm5719-llvm-c63428b1921395bd06dbb8226eab833a0b2ce52a.tar.gz
bcm5719-llvm-c63428b1921395bd06dbb8226eab833a0b2ce52a.zip
Fixup codegen for __block int i; i += rhs();. Should also slightly
improve codegen in some cases. llvm-svn: 72273
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/blocks-seq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/test/CodeGen/blocks-seq.c b/clang/test/CodeGen/blocks-seq.c
index eb4990a3df6..f637fbc0782 100644
--- a/clang/test/CodeGen/blocks-seq.c
+++ b/clang/test/CodeGen/blocks-seq.c
@@ -1,13 +1,18 @@
// RUN: clang-cc -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o %t %s &&
// RUN: grep '%call = call i32 (...)\* @rhs()' %t | count 1 &&
-// If this fails, see about sliding %4 and %5...
+// If this fails, see about sliding %4, %5, %6 and %7...
// RUN: grep '%forwarding1 = getelementptr %0\* %i, i32 0, i32 1' %t | count 1 &&
// RUN: grep '%4 = bitcast i8\*\* %forwarding1 to %0\*\*' %t | count 1 &&
-// RUN: grep '%5 = load %0\*\* %4' %t | count 1
+// RUN: grep '%5 = load %0\*\* %4' %t | count 1 &&
+// RUN: grep '%call2 = call i32 (...)\* @rhs()' %t | count 1 &&
+// RUN: grep '%forwarding3 = getelementptr %0\* %i, i32 0, i32 1' %t | count 1 &&
+// RUN: grep '%6 = bitcast i8\*\* %forwarding3 to %0\*\*' %t | count 1 &&
+// RUN: grep '%7 = load %0\*\* %6' %t | count 1
int rhs();
void foo() {
__block int i;
i = rhs();
+ i += rhs();
}
OpenPOWER on IntegriCloud