brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 8163074 Raw
73 lines · plain
1# RUN: llc -mtriple=hexagon -run-pass pipeliner -debug-only=pipeliner %s -o /dev/null 2>&1 | FileCheck %s2# REQUIRES: asserts3 4# Test that pipeliner correctly detects the loop-carried dependency between the5# load and the store, which is indicated by `Ord` dependency from SU(2) to6# SU(4). Note that there is no dependency within a single iteration.7 8# CHECK:      SU(2):   %7:intregs = L2_loadri_io %5:intregs, 0 :: (load (s32) from %ir.ptr.load)9# CHECK-NEXT:   # preds left10# CHECK-NEXT:   # succs left11# CHECK-NEXT:   # rdefs left12# CHECK-NEXT:   Latency13# CHECK-NEXT:   Depth14# CHECK-NEXT:   Height15# CHECK-NEXT:   Predecessors:16# CHECK-NEXT:     SU(0): Data Latency=0 Reg=%517# CHECK-NEXT:   Successors:18# CHECK-DAG:      SU(3): Data Latency=2 Reg=%719# CHECK-DAG:      SU(4): Ord  Latency=1 Barrier20# CHECK-NEXT: SU(3):   %8:intregs = F2_sfadd %7:intregs, %3:intregs, implicit $usr21# CHECK:      SU(4):   S2_storeri_io %6:intregs, 0, %8:intregs :: (store (s32) into %ir.ptr.store)22 23 24--- |25  define void @foo(ptr noalias %p0, ptr noalias %p1, i32 %n) {26  entry:27    br label %body28  29  body:                                             ; preds = %body, %entry30    %i = phi i32 [ 0, %entry ], [ %i.next, %body ]31    %ptr.load = phi ptr [ %p0, %entry ], [ %p1, %body ]32    %ptr.store = phi ptr [ %p1, %entry ], [ %p0, %body ]33    %v = load float, ptr %ptr.load, align 434    %add = fadd float %v, 1.000000e+0035    store float %add, ptr %ptr.store, align 436    %i.next = add i32 %i, 137    %cond = icmp slt i32 %i.next, %n38    br i1 %cond, label %body, label %exit39  40  exit:                                             ; preds = %body41    ret void42  }43...44---45name:            foo46tracksRegLiveness: true47body:             |48  bb.0.entry:49    successors: %bb.1(0x80000000)50    liveins: $r0, $r1, $r251  52    %6:intregs = COPY $r253    %5:intregs = COPY $r154    %4:intregs = COPY $r055    %9:intregs = A2_tfrsi 106535321656    %12:intregs = COPY %657    J2_loop0r %bb.1, %12, implicit-def $lc0, implicit-def $sa0, implicit-def $usr58  59  bb.1.body (machine-block-address-taken):60    successors: %bb.1(0x7c000000), %bb.2(0x04000000)61  62    %1:intregs = PHI %4, %bb.0, %5, %bb.163    %2:intregs = PHI %5, %bb.0, %4, %bb.164    %8:intregs = L2_loadri_io %1, 0 :: (load (s32) from %ir.ptr.load)65    %10:intregs = F2_sfadd killed %8, %9, implicit $usr66    S2_storeri_io %2, 0, killed %10 :: (store (s32) into %ir.ptr.store)67    ENDLOOP0 %bb.1, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc068    J2_jump %bb.2, implicit-def dead $pc69  70  bb.2.exit:71    PS_jmpret $r31, implicit-def dead $pc72...73