1; RUN: llc < %s -mtriple=i686-linux | FileCheck %s 2; Check the register copy comes after the call to f and before the call to g 3; PR3784 4 5declare i32 @f() 6 7declare i32 @g() 8 9define i32 @phi() personality i32 (...)* @__gxx_personality_v0 { 10entry: 11 %a = call i32 @f() ; <i32> [#uses=1] 12 %b = invoke i32 @g() 13 to label %cont unwind label %lpad ; <i32> [#uses=1] 14 15cont: ; preds = %entry 16 %x = phi i32 [ %b, %entry ] ; <i32> [#uses=0] 17 %aa = call i32 @g() ; <i32> [#uses=1] 18 %bb = invoke i32 @g() 19 to label %cont2 unwind label %lpad ; <i32> [#uses=1] 20 21cont2: ; preds = %cont 22 %xx = phi i32 [ %bb, %cont ] ; <i32> [#uses=1] 23 ret i32 %xx 24 25lpad: ; preds = %cont, %entry 26 %y = phi i32 [ %a, %entry ], [ %aa, %cont ] ; <i32> [#uses=1] 27 %exn = landingpad {i8*, i32} 28 cleanup 29 ret i32 %y 30} 31 32; CHECK: call{{.*}}f 33; CHECK: movl %eax, %esi 34; CHECK: call{{.*}}g 35 36declare i32 @__gxx_personality_v0(...) 37