summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/condition.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-23 21:56:41 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-23 21:56:41 +0000
commitff8e11579fc904aa4032d90d2be6ce1ac5fc9fe1 (patch)
treeb069af57037631391abe9daba285d6d35dc88711 /test/CodeGenCXX/condition.cpp
parenteb024acef8a8fef3cb5e01a2e0c3efb90372c8af (diff)
Revise cleanup IR generation to fix a major bug with cleanups (PR7686)
as well as some significant asymptotic inefficiencies with threading multiple jumps through deep cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/condition.cpp')
-rw-r--r--test/CodeGenCXX/condition.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/CodeGenCXX/condition.cpp b/test/CodeGenCXX/condition.cpp
index 652e7c89c1..cc2eaf5bd6 100644
--- a/test/CodeGenCXX/condition.cpp
+++ b/test/CodeGenCXX/condition.cpp
@@ -105,12 +105,12 @@ void while_destruct(int z) {
// CHECK-NEXT: br i1 [[COND]]
// Loop-exit staging block.
- // CHECK: store i32 1, i32* [[CLEANUPDEST]]
+ // CHECK: store i32 3, i32* [[CLEANUPDEST]]
// CHECK-NEXT: br
// While body.
// CHECK: store i32 21, i32* [[Z]]
- // CHECK: store i32 2, i32* [[CLEANUPDEST]]
+ // CHECK: store i32 0, i32* [[CLEANUPDEST]]
// CHECK-NEXT: br
z = 21;
@@ -138,7 +138,7 @@ void while_destruct(int z) {
// CHECK: define void @_Z12for_destructi(
void for_destruct(int z) {
// CHECK: [[Z:%.*]] = alloca i32
- // CHECK: [[XDEST:%.*]] = alloca i32
+ // CHECK: [[CLEANUPDEST:%.*]] = alloca i32
// CHECK: [[I:%.*]] = alloca i32
// CHECK: call void @_ZN1YC1Ev
// CHECK-NEXT: br
@@ -152,7 +152,7 @@ void for_destruct(int z) {
// -> %for.body, %for.cond.cleanup
// %for.cond.cleanup: Exit cleanup staging.
- // CHECK: store i32 1, i32* [[XDEST]]
+ // CHECK: store i32 2, i32* [[CLEANUPDEST]]
// CHECK-NEXT: br
// -> %cleanup
@@ -166,21 +166,21 @@ void for_destruct(int z) {
// CHECK: [[TMP:%.*]] = load i32* [[Z]]
// CHECK-NEXT: [[INC:%.*]] = add nsw i32 [[TMP]], 1
// CHECK-NEXT: store i32 [[INC]], i32* [[Z]]
- // CHECK-NEXT: store i32 2, i32* [[XDEST]]
+ // CHECK-NEXT: store i32 0, i32* [[CLEANUPDEST]]
// CHECK-NEXT: br
// -> %cleanup
// %cleanup: Destroys X.
// CHECK: call void @_ZN1XD1Ev
- // CHECK-NEXT: [[YDESTTMP:%.*]] = load i32* [[XDEST]]
+ // CHECK-NEXT: [[YDESTTMP:%.*]] = load i32* [[CLEANUPDEST]]
// CHECK-NEXT: switch i32 [[YDESTTMP]]
- // 1 -> %cleanup4, 2 -> %cleanup.cont
+ // 0 -> %cleanup.cont, default -> %cleanup1
// %cleanup.cont: (eliminable)
// CHECK: br
// -> %for.cond
- // %cleanup4: Destroys Y.
+ // %cleanup1: Destroys Y.
// CHECK: call void @_ZN1YD1Ev(
// CHECK-NEXT: br
// -> %for.end