2010-09-03 11:24:08 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-linux -asm-verbose | FileCheck %s
|
2009-03-17 17:46:22 +08:00
|
|
|
; Check that register copies in the landing pad come after the EH_LABEL
|
|
|
|
|
|
|
|
declare i32 @f()
|
|
|
|
|
2015-06-18 04:52:32 +08:00
|
|
|
define i32 @phi(i32 %x) personality i32 (...)* @__gxx_personality_v0 {
|
2009-03-17 17:46:22 +08:00
|
|
|
entry:
|
|
|
|
%a = invoke i32 @f()
|
|
|
|
to label %cont unwind label %lpad ; <i32> [#uses=1]
|
|
|
|
|
|
|
|
cont: ; preds = %entry
|
|
|
|
%b = invoke i32 @f()
|
|
|
|
to label %cont2 unwind label %lpad ; <i32> [#uses=1]
|
|
|
|
|
|
|
|
cont2: ; preds = %cont
|
|
|
|
ret i32 %b
|
|
|
|
|
|
|
|
lpad: ; preds = %cont, %entry
|
|
|
|
%v = phi i32 [ %x, %entry ], [ %a, %cont ] ; <i32> [#uses=1]
|
2015-06-18 04:52:32 +08:00
|
|
|
%exn = landingpad {i8*, i32}
|
2011-09-01 05:39:05 +08:00
|
|
|
cleanup
|
2009-03-17 17:46:22 +08:00
|
|
|
ret i32 %v
|
|
|
|
}
|
2009-11-22 19:45:44 +08:00
|
|
|
|
|
|
|
; CHECK: lpad
|
2010-03-14 16:36:50 +08:00
|
|
|
; CHECK-NEXT: Ltmp
|
2011-09-01 05:39:05 +08:00
|
|
|
|
|
|
|
declare i32 @__gxx_personality_v0(...)
|