blob: 091aab41d291ebfcbf276ec261be92ebdc5ef242 [file] [log] [blame]
Dan Gohmanb4ec29f2009-03-31 18:20:47 +00001; RUN: llvm-as < %s | llc -march=x86 -asm-verbose | grep -A 1 lpad | grep Llabel
Duncan Sands5ce58d02009-03-17 09:46:22 +00002; Check that register copies in the landing pad come after the EH_LABEL
3
4declare i32 @f()
5
6define i32 @phi(i32 %x) {
7entry:
8 %a = invoke i32 @f()
9 to label %cont unwind label %lpad ; <i32> [#uses=1]
10
11cont: ; preds = %entry
12 %b = invoke i32 @f()
13 to label %cont2 unwind label %lpad ; <i32> [#uses=1]
14
15cont2: ; preds = %cont
16 ret i32 %b
17
18lpad: ; preds = %cont, %entry
19 %v = phi i32 [ %x, %entry ], [ %a, %cont ] ; <i32> [#uses=1]
20 ret i32 %v
21}