diff options
author | John McCall <rjmccall@apple.com> | 2010-07-23 21:56:41 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-07-23 21:56:41 +0000 |
commit | ad5d61e227c9879227c5bf9a6c82bbb5fdd5a7b0 (patch) | |
tree | 29d8194fe3b19f712530cae4fe382ddcb6aba541 /clang/test/CodeGenCXX/condition.cpp | |
parent | 946274471da40720baae5e510d2df90854973c01 (diff) | |
download | llvm-ad5d61e227c9879227c5bf9a6c82bbb5fdd5a7b0.zip llvm-ad5d61e227c9879227c5bf9a6c82bbb5fdd5a7b0.tar.gz llvm-ad5d61e227c9879227c5bf9a6c82bbb5fdd5a7b0.tar.bz2 |
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.
llvm-svn: 109274
Diffstat (limited to 'clang/test/CodeGenCXX/condition.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/condition.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/CodeGenCXX/condition.cpp b/clang/test/CodeGenCXX/condition.cpp index 652e7c8..cc2eaf5 100644 --- a/clang/test/CodeGenCXX/condition.cpp +++ b/clang/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 |