diff options
author | Duncan Sands <baldrick@free.fr> | 2011-09-05 06:52:48 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2011-09-05 06:52:48 +0000 |
commit | fd26a954a8e87ae58838da691e49b1c629252cef (patch) | |
tree | 7e3666b391e6b9730ec013521dc1cba610a5b795 /llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll | |
parent | 58b3749d6cdbc3de390a3ee280a3065e7b4fa9b1 (diff) | |
download | bcm5719-llvm-fd26a954a8e87ae58838da691e49b1c629252cef.tar.gz bcm5719-llvm-fd26a954a8e87ae58838da691e49b1c629252cef.zip |
Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg.
llvm-svn: 139113
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll')
-rw-r--r-- | llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll b/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll new file mode 100644 index 00000000000..4067d5dc76c --- /dev/null +++ b/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll @@ -0,0 +1,22 @@ +; RUN: opt < %s -instsimplify -S | FileCheck %s + +; CHECK-NOT: extractvalue +; CHECK-NOT: insertvalue + +declare void @bar() + +define void @foo() { +entry: + invoke void @bar() to label %cont unwind label %lpad +cont: + ret void +lpad: + %ex = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 cleanup + %exc_ptr = extractvalue { i8*, i32 } %ex, 0 + %filter = extractvalue { i8*, i32 } %ex, 1 + %exc_ptr2 = insertvalue { i8*, i32 } undef, i8* %exc_ptr, 0 + %filter2 = insertvalue { i8*, i32 } %exc_ptr2, i32 %filter, 1 + resume { i8*, i32 } %filter2 +} + +declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*) |