CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
104 lines
3.4 KiB
YAML
104 lines
3.4 KiB
YAML
# RUN: llc -mtriple=hexagon -run-pass pipeliner -debug-only=pipeliner %s -o /dev/null 2>&1 -pipeliner-experimental-cg=true | FileCheck %s
|
|
# REQUIRES: asserts
|
|
|
|
# Test that loop-carried memory dependencies are added correctly.
|
|
# The original code is as follows.
|
|
#
|
|
# ```
|
|
# void f(int *a, int n) {
|
|
# for (int i = 1; i < n; i++) {
|
|
# a[i] += a[i];
|
|
# a[i-1] += i;
|
|
# }
|
|
# }
|
|
# ```
|
|
#
|
|
# Loop-carried dependencies exist from load/store for a[i] to store for a[i-1], but not vice versa.
|
|
|
|
# CHECK: ===== Loop Carried Edges Begin =====
|
|
# CHECK-NEXT: Loop carried edges from SU(3)
|
|
# CHECK-NEXT: Order
|
|
# CHECK-NEXT: SU(7)
|
|
# CHECK-NEXT: Loop carried edges from SU(5)
|
|
# CHECK-NEXT: Order
|
|
# CHECK-NEXT: SU(7)
|
|
# CHECK-NEXT: ===== Loop Carried Edges End =====
|
|
|
|
--- |
|
|
define dso_local void @f(ptr nocapture noundef %a, i32 noundef %n) local_unnamed_addr {
|
|
entry:
|
|
%cmp11 = icmp sgt i32 %n, 1
|
|
br i1 %cmp11, label %for.body.preheader, label %for.cond.cleanup
|
|
|
|
for.body.preheader:
|
|
%load_initial = load i32, ptr %a, align 4
|
|
%cgep = getelementptr i8, ptr %a, i32 4
|
|
br label %for.body
|
|
|
|
for.cond.cleanup:
|
|
ret void
|
|
|
|
for.body:
|
|
%lsr.iv = phi ptr [ %cgep, %for.body.preheader ], [ %cgep16, %for.body ]
|
|
%store_forwarded = phi i32 [ %load_initial, %for.body.preheader ], [ %add, %for.body ]
|
|
%i.012 = phi i32 [ 1, %for.body.preheader ], [ %inc, %for.body ]
|
|
%0 = load i32, ptr %lsr.iv, align 4, !tbaa !5
|
|
%add = shl nsw i32 %0, 1
|
|
store i32 %add, ptr %lsr.iv, align 4, !tbaa !5
|
|
%1 = add i32 %store_forwarded, %i.012
|
|
%cgep15 = getelementptr i8, ptr %lsr.iv, i32 -4
|
|
store i32 %1, ptr %cgep15, align 4, !tbaa !5
|
|
%inc = add nuw nsw i32 %i.012, 1
|
|
%exitcond.not = icmp eq i32 %n, %inc
|
|
%cgep16 = getelementptr i8, ptr %lsr.iv, i32 4
|
|
br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
|
|
}
|
|
|
|
!5 = !{!6, !6, i64 0}
|
|
!6 = !{!"int", !7, i64 0}
|
|
!7 = !{!"omnipotent char", !8, i64 0}
|
|
!8 = !{!"Simple C/C++ TBAA"}
|
|
|
|
...
|
|
---
|
|
name: f
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0.entry:
|
|
successors: %bb.1, %bb.2
|
|
liveins: $r0, $r1
|
|
|
|
%9:intregs = COPY $r1
|
|
%8:intregs = COPY $r0
|
|
%10:predregs = C2_cmpgti %9, 1
|
|
J2_jumpf %10, %bb.2, implicit-def dead $pc
|
|
J2_jump %bb.1, implicit-def dead $pc
|
|
|
|
bb.1.for.body.preheader:
|
|
%0:intregs, %1:intregs = L2_loadri_pi %8, 4 :: (load (s32) from %ir.a)
|
|
%12:intregs = A2_tfrsi 1
|
|
%16:intregs = A2_addi %9, -1
|
|
%17:intregs = COPY %16
|
|
J2_loop0r %bb.3, %17, implicit-def $lc0, implicit-def $sa0, implicit-def $usr
|
|
J2_jump %bb.3, implicit-def dead $pc
|
|
|
|
bb.2.for.cond.cleanup:
|
|
PS_jmpret $r31, implicit-def dead $pc
|
|
|
|
bb.3.for.body (machine-block-address-taken):
|
|
successors: %bb.2(0x04000000), %bb.3(0x7c000000)
|
|
|
|
%2:intregs = PHI %1, %bb.1, %7, %bb.3
|
|
%3:intregs = PHI %0, %bb.1, %5, %bb.3
|
|
%4:intregs = PHI %12, %bb.1, %6, %bb.3
|
|
%13:intregs = L2_loadri_io %2, 0 :: (load (s32) from %ir.lsr.iv, !tbaa !5)
|
|
%5:intregs = nsw S2_asl_i_r killed %13, 1
|
|
S2_storeri_io %2, 0, %5 :: (store (s32) into %ir.lsr.iv, !tbaa !5)
|
|
%14:intregs = A2_add %3, %4
|
|
S2_storeri_io %2, -4, killed %14 :: (store (s32) into %ir.cgep15, !tbaa !5)
|
|
%6:intregs = nuw nsw A2_addi %4, 1
|
|
%7:intregs = A2_addi %2, 4
|
|
ENDLOOP0 %bb.3, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0
|
|
J2_jump %bb.2, implicit-def $pc
|
|
...
|