summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/misched-new.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/misched-new.ll')
-rw-r--r--test/CodeGen/X86/misched-new.ll28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/CodeGen/X86/misched-new.ll b/test/CodeGen/X86/misched-new.ll
index 8f2f6f7..cec04b5 100644
--- a/test/CodeGen/X86/misched-new.ll
+++ b/test/CodeGen/X86/misched-new.ll
@@ -1,4 +1,6 @@
-; RUN: llc -march=x86-64 -mcpu=core2 -enable-misched -misched=shuffle -misched-bottomup < %s
+; RUN: llc < %s -march=x86-64 -mcpu=core2 -x86-early-ifcvt -enable-misched \
+; RUN: -misched=shuffle -misched-bottomup -verify-machineinstrs \
+; RUN: | FileCheck %s
; REQUIRES: asserts
;
; Interesting MachineScheduler cases.
@@ -25,3 +27,27 @@ for.cond.preheader: ; preds = %entry
if.end: ; preds = %entry
ret void
}
+
+; The machine verifier checks that EFLAGS kill flags are updated when
+; the scheduler reorders cmovel instructions.
+;
+; CHECK: test
+; CHECK: cmovel
+; CHECK: cmovel
+; CHECK: call
+define void @foo(i32 %b) nounwind uwtable ssp {
+entry:
+ %tobool = icmp ne i32 %b, 0
+ br i1 %tobool, label %if.then, label %if.end
+
+if.then: ; preds = %entry
+ br label %if.end
+
+if.end: ; preds = %if.then, %entry
+ %v1 = phi i32 [1, %entry], [2, %if.then]
+ %v2 = phi i32 [3, %entry], [4, %if.then]
+ call void @bar(i32 %v1, i32 %v2)
+ ret void
+}
+
+declare void @bar(i32,i32)
OpenPOWER on IntegriCloud