Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Hexagon/swp-carried-dep2.mir
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

80 lines
2.7 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 the loop carried dependence check correctly identifies dependences
# when the loop variable decreases and the array index offset is negative.
# No dependence from the store to the load, but there is a dependence from the
# load to the store.
# CHECK: Overlap check:
# CHECK-NEXT: BaseMI: %{{[0-9]+}}:intregs = L2_loadri_io %{{[0-9]+}}:intregs, -8 :: (load (s32) from %ir.cgep)
# CHECK-NEXT: Base + -8 + I * -4, Len: 4
# CHECK-NEXT: OtherMI: S2_storeri_io %{{[0-9]+}}:intregs, 0, %{{[0-9]+}}:intregs :: (store (s32) into %ir.lsr.iv1)
# CHECK-NEXT: Base + 0 + I * -4, Len: 4
# CHECK-NEXT: Result: Overlap
# CHECK: Overlap check:
# CHECK-NEXT: BaseMI: S2_storeri_io %{{[0-9]+}}:intregs, 0, %{{[0-9]+}}:intregs :: (store (s32) into %ir.lsr.iv1)
# CHECK-NEXT: Base + 0 + I * -4, Len: 4
# CHECK-NEXT: OtherMI: %{{[0-9]+}}:intregs = L2_loadri_io %{{[0-9]+}}:intregs, -8 :: (load (s32) from %ir.cgep)
# CHECK-NEXT: Base + -8 + I * -4, Len: 4
# CHECK-NEXT: Result: No overlap
--- |
define void @test() {
b0:
br label %b3
b3:
%lsr.iv = phi ptr [ %0, %b3 ], [ undef, %b0 ]
%v0 = phi i32 [ %v8, %b3 ], [ 7, %b0 ]
%v1 = phi i32 [ %v6, %b3 ], [ undef, %b0 ]
%v2 = phi i32 [ %v1, %b3 ], [ undef, %b0 ]
%lsr.iv1 = bitcast ptr %lsr.iv to ptr
%cgep = getelementptr i32, ptr %lsr.iv1, i32 -2
%v6 = load i32, ptr %cgep, align 4
%v7 = tail call i32 @llvm.hexagon.A2.subsat(i32 %v2, i32 %v6)
store i32 %v7, ptr %lsr.iv1, align 4
%v8 = add i32 %v0, -1
%cgep3 = getelementptr [9 x i32], ptr %lsr.iv, i32 0, i32 -1
%0 = bitcast ptr %cgep3 to ptr
%v9 = icmp sgt i32 %v8, 1
br i1 %v9, label %b3, label %b4
b4:
unreachable
}
declare i32 @llvm.hexagon.A2.subsat(i32, i32) #0
declare void @llvm.stackprotector(ptr, ptr) #1
...
---
name: test
tracksRegLiveness: true
body: |
bb.0:
successors: %bb.1
%10:intregs = IMPLICIT_DEF
%11:intregs = IMPLICIT_DEF
J2_loop0i %bb.1, 6, implicit-def $lc0, implicit-def $sa0, implicit-def $usr
bb.1 (machine-block-address-taken):
successors: %bb.1, %bb.2
%0:intregs = PHI %11, %bb.0, %6, %bb.1
%2:intregs = PHI %10, %bb.0, %4, %bb.1
%3:intregs = PHI %10, %bb.0, %2, %bb.1
%4:intregs = L2_loadri_io %0, -8 :: (load (s32) from %ir.cgep)
%12:intregs = A2_subsat %3, %4, implicit-def dead $usr_ovf
S2_storeri_io %0, 0, %12 :: (store (s32) into %ir.lsr.iv1)
%6:intregs = A2_addi %0, -4
ENDLOOP0 %bb.1, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0
J2_jump %bb.2, implicit-def dead $pc
bb.2:
...