~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Transforms/SimplifyCFG/invoke_unwind.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -simplifycfg -S | FileCheck %s
 
2
 
 
3
declare void @bar()
 
4
 
 
5
; This testcase checks to see if the simplifycfg pass is converting invoke
 
6
; instructions to call instructions if the handler just rethrows the exception.
 
7
define i32 @test1() {
 
8
; CHECK: @test1
 
9
; CHECK-NEXT: call void @bar()
 
10
; CHECK-NEXT: ret i32 0
 
11
        invoke void @bar( )
 
12
                        to label %1 unwind label %Rethrow
 
13
        ret i32 0
 
14
Rethrow:
 
15
        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
 
16
                 catch i8* null
 
17
        resume { i8*, i32 } %exn
 
18
}
 
19
 
 
20
declare i32 @__gxx_personality_v0(...)