blob: adbd241cd98fad6369a1263b2d554fd40162a295 [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -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}