CodeGen peephole: fold redundant phys reg copies
[oota-llvm.git] / test / CodeGen / X86 / 2009-03-13-PHIElimBug.ll
index ad7f9f7d1c11e79cf2732f6fb4b844ee6bb4c801..91f29c4f24cd96df0fa2093a27610fab07397484 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | FileCheck %s
+; RUN: llc < %s -mtriple=i686-linux | FileCheck %s
 ; Check the register copy comes after the call to f and before the call to g
 ; PR3784
 
@@ -6,7 +6,7 @@ declare i32 @f()
 
 declare i32 @g()
 
-define i32 @phi() {
+define i32 @phi() personality i32 (...)* @__gxx_personality_v0 {
 entry:
        %a = call i32 @f()              ; <i32> [#uses=1]
        %b = invoke i32 @g()
@@ -24,9 +24,13 @@ cont2:               ; preds = %cont
 
 lpad:          ; preds = %cont, %entry
        %y = phi i32 [ %a, %entry ], [ %aa, %cont ]             ; <i32> [#uses=1]
+        %exn = landingpad {i8*, i32}
+                 cleanup
        ret i32 %y
 }
 
 ; CHECK: call{{.*}}f
-; CHECK-NEXT: Llabel1:
-; CHECK-NEXT: movl %eax, %esi
+; CHECK: movl %eax, %esi
+; CHECK: call{{.*}}g
+
+declare i32 @__gxx_personality_v0(...)