1 # RUN: llc --march=hexagon %s -run-pass=pipeliner -debug-only=pipeliner \
2 # RUN: -window-sched=force -filetype=null -verify-machineinstrs 2>&1 \
6 # Test that checks no window scheduler is performed if the II set by pragma was
9 # CHECK: Window scheduling is disabled when llvm.loop.pipeline.initiationinterval is set.
12 define void @test_pragma_ii_fail(ptr %a0, i32 %a1) {
14 %v0 = icmp sgt i32 %a1, 1
15 br i1 %v0, label %b1, label %b4
18 %v1 = load i32, ptr %a0, align 4
21 %cgep = getelementptr i32, ptr %a0, i32 1
24 b2: ; preds = %b2, %b1
25 %v5 = phi i32 [ %v12, %b2 ], [ %v4, %b1 ]
26 %v6 = phi ptr [ %cgep2, %b2 ], [ %cgep, %b1 ]
27 %v7 = phi i32 [ %v10, %b2 ], [ %v2, %b1 ]
28 store i32 %v7, ptr %v6, align 4
30 %cgep1 = getelementptr i32, ptr %v6, i32 -1
31 store i32 %v8, ptr %cgep1, align 4
32 %v10 = add i32 %v7, 10
33 %v12 = add i32 %v5, -1
34 %v13 = icmp eq i32 %v12, 0
35 %cgep2 = getelementptr i32, ptr %v6, i32 1
36 br i1 %v13, label %b4, label %b2, !llvm.loop !0
38 b4: ; preds = %b2, %b0
42 !0 = distinct !{!0, !1}
43 !1 = !{!"llvm.loop.pipeline.initiationinterval", i32 2}
46 name: test_pragma_ii_fail
47 tracksRegLiveness: true
50 successors: %bb.1(0x40000000), %bb.3(0x40000000)
55 %2:predregs = C2_cmpgti %0, 1
56 J2_jumpf %2, %bb.3, implicit-def dead $pc
57 J2_jump %bb.1, implicit-def dead $pc
60 successors: %bb.2(0x80000000)
62 %3:intregs, %4:intregs = L2_loadri_pi %1, 4
63 %5:intregs = A2_addi killed %3, 10
64 %6:intregs = A2_addi %0, -1
66 J2_loop0r %bb.2, %7, implicit-def $lc0, implicit-def $sa0, implicit-def $usr
68 bb.2.b2 (machine-block-address-taken):
69 successors: %bb.3(0x04000000), %bb.2(0x7c000000)
71 %8:intregs = PHI %4, %bb.1, %9, %bb.2
72 %10:intregs = PHI %5, %bb.1, %11, %bb.2
73 S2_storeri_io %8, 0, %10
74 %11:intregs = A2_addi %10, 10
75 S2_storeri_io %8, -4, %11
76 %9:intregs = A2_addi %8, 4
77 ENDLOOP0 %bb.2, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0
78 J2_jump %bb.3, implicit-def dead $pc
81 PS_jmpret $r31, implicit-def dead $pc