diff options
| author | Reid Kleckner <reid@kleckner.net> | 2015-02-20 01:00:19 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2015-02-20 01:00:19 +0000 |
| commit | 0b647e6cca16a55cce3d7e4dcc86b75273a5598b (patch) | |
| tree | e3931a7fe2595e085ca754f1df46c16ae67330b9 /llvm/test/CodeGen/XCore | |
| parent | 0d94fa98e53c851f7646666a49bc1a01fa7d9782 (diff) | |
| download | bcm5719-llvm-0b647e6cca16a55cce3d7e4dcc86b75273a5598b.tar.gz bcm5719-llvm-0b647e6cca16a55cce3d7e4dcc86b75273a5598b.zip | |
EH: Prune unreachable resume instructions during Dwarf EH preparation
Today a simple function that only catches exceptions and doesn't run
destructor cleanups ends up containing a dead call to _Unwind_Resume
(PR20300). We can't remove these dead resume instructions during normal
optimization because inlining might introduce additional landingpads
that do have cleanups to run. Instead we can do this during EH
preparation, which is guaranteed to run after inlining.
Fixes PR20300.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D7744
llvm-svn: 229944
Diffstat (limited to 'llvm/test/CodeGen/XCore')
| -rw-r--r-- | llvm/test/CodeGen/XCore/exception.ll | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/XCore/exception.ll b/llvm/test/CodeGen/XCore/exception.ll index fec83eb15ea..cd9771d6401 100644 --- a/llvm/test/CodeGen/XCore/exception.ll +++ b/llvm/test/CodeGen/XCore/exception.ll @@ -78,6 +78,7 @@ cont: ; CHECK: bl __cxa_end_catch lpad: %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + cleanup catch i8* bitcast (i8** @_ZTIi to i8*) catch i8* bitcast (i8** @_ZTId to i8*) %1 = extractvalue { i8*, i32 } %0, 0 @@ -110,13 +111,14 @@ Exit: ; CHECK: .long [[PRE_G]]-[[START]] ; CHECK: .long [[POST_G]]-[[PRE_G]] ; CHECK: .long [[LANDING]]-[[START]] -; CHECK: .byte 3 +; CHECK: .byte 5 ; CHECK: .long [[POST_G]]-[[START]] ; CHECK: .long [[END]]-[[POST_G]] ; CHECK: .long 0 ; CHECK: .byte 0 -; CHECK: .byte 1 ; CHECK: .byte 0 +; CHECK: .byte 1 +; CHECK: .byte 125 ; CHECK: .byte 2 ; CHECK: .byte 125 ; CHECK: .long _ZTIi |

