1 ; RUN: llc -march=mipsel -O0 < %s | FileCheck %s -check-prefix=None
2 ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=Default
4 define void @foo1() nounwind {
17 tail call void @foo2(i32 3) nounwind
21 declare void @foo2(i32)
23 ; Check that cvt.d.w goes into jalr's delay slot.
25 define void @foo3(i32 %a) nounwind {
31 %conv = sitofp i32 %a to double
32 tail call void @foo4(double %conv) nounwind
36 declare void @foo4(double)
38 @g2 = external global i32
39 @g1 = external global i32
40 @g3 = external global i32
42 ; Check that branch delay slot can be filled with an instruction with operand
48 define void @foo5(i32 %a) nounwind {
50 %0 = load i32* @g2, align 4
51 %tobool = icmp eq i32 %a, 0
52 br i1 %tobool, label %if.else, label %if.then
55 %1 = load i32* @g1, align 4
56 %add = add nsw i32 %1, %0
57 store i32 %add, i32* @g1, align 4
61 %2 = load i32* @g3, align 4
62 %sub = sub nsw i32 %2, %0
63 store i32 %sub, i32* @g3, align 4