diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-01-22 02:25:56 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-01-22 02:25:56 +0000 |
commit | 2a2e1563182c4ded9bb8baeb377a85bc84849549 (patch) | |
tree | fd84b89ee53f12b730cdac52b193f9d955255618 /clang/test/CodeGen/exceptions-seh.c | |
parent | f1f4bc217627a6593246f837bb1bcbef3cc92ad6 (diff) | |
download | bcm5719-llvm-2a2e1563182c4ded9bb8baeb377a85bc84849549.tar.gz bcm5719-llvm-2a2e1563182c4ded9bb8baeb377a85bc84849549.zip |
SEH: Emit the constant filter 1 as a catch-all
Minor optimization of code like __try { ... } __except(1) { ... }.
llvm-svn: 226766
Diffstat (limited to 'clang/test/CodeGen/exceptions-seh.c')
-rw-r--r-- | clang/test/CodeGen/exceptions-seh.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/test/CodeGen/exceptions-seh.c b/clang/test/CodeGen/exceptions-seh.c index ebf1cfbb2be..bba5eac36c5 100644 --- a/clang/test/CodeGen/exceptions-seh.c +++ b/clang/test/CodeGen/exceptions-seh.c @@ -26,13 +26,11 @@ int safe_div(int numerator, int denominator, int *res) { // // CHECK: [[lpad]] // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) -// CHECK: %[[sel:[^ ]*]] = load i32* -// CHECK: %[[filt_id:[^ ]*]] = call i32 @llvm.eh.typeid.for(i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0@0@safe_div@@" to i8*)) -// CHECK: %[[matches:[^ ]*]] = icmp eq i32 %[[sel]], %[[filt_id]] -// CHECK: br i1 %[[matches]], label %[[except_bb:[^ ]*]], label %{{.*}} -// -// CHECK: [[except_bb]] -// CHECK: store i32 -42, i32* %[[success:[^ ]*]] +// CHECK-NEXT: catch i8* null +// CHECK-NOT: br i1 +// CHECK: br label %[[except:[^ ]*]] +// CHECK: [[except]] +// CHECK-NEXT: store i32 -42, i32* %[[success:[^ ]*]] // // CHECK: %[[res:[^ ]*]] = load i32* %[[success]] // CHECK: ret i32 %[[res]] |