1 ; RUN: llc < %s -march=x86-64 -mcpu=core2 -x86-early-ifcvt -enable-misched \
2 ; RUN: -misched=shuffle -misched-bottomup -verify-machineinstrs \
6 ; Interesting MachineScheduler cases.
8 ; FIXME: There should be an assert in the coalescer that we're not rematting
9 ; "not-quite-dead" copies, but that breaks a lot of tests <rdar://problem/11148682>.
11 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
14 ; After coalescing, we have a dead superreg (RAX) definition.
16 ; CHECK: xorl %esi, %esi
17 ; CHECK: movl $32, %ecx
19 define fastcc void @_preextrapolate_helper() nounwind uwtable ssp {
21 br i1 undef, label %for.cond.preheader, label %if.end
23 for.cond.preheader: ; preds = %entry
24 call void @llvm.memcpy.p0i8.p0i8.i64(i8* undef, i8* null, i64 128, i32 4, i1 false) nounwind
27 if.end: ; preds = %entry
31 ; The machine verifier checks that EFLAGS kill flags are updated when
32 ; the scheduler reorders cmovel instructions.
38 define void @foo(i32 %b) nounwind uwtable ssp {
40 %tobool = icmp ne i32 %b, 0
41 br i1 %tobool, label %if.then, label %if.end
43 if.then: ; preds = %entry
46 if.end: ; preds = %if.then, %entry
47 %v1 = phi i32 [1, %entry], [2, %if.then]
48 %v2 = phi i32 [3, %entry], [4, %if.then]
49 call void @bar(i32 %v1, i32 %v2)
53 declare void @bar(i32,i32)