Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Hexagon/store-shift.ll
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

51 lines
1.9 KiB
LLVM

; RUN: llc -mtriple=hexagon < %s | FileCheck %s
; CHECK-DAG: r[[BASE:[0-9]+]] = add(r1,#1000)
; CHECK-DAG: r[[IDX0:[0-9]+]] = add(r2,#5)
; CHECK-DAG: r[[IDX1:[0-9]+]] = add(r2,#6)
; CHECK-DAG: memw(r0+r[[IDX0]]<<#2) = r3
; CHECK-DAG: memw(r0+r[[IDX1]]<<#2) = r3
; CHECK-DAG: memw(r[[BASE]]+r[[IDX0]]<<#2) = r[[IDX0]]
; CHECK-DAG: memw(r[[BASE]]+r[[IDX1]]<<#2) = r[[IDX0]]
target triple = "hexagon"
@G = external global i32, align 4
; Function Attrs: norecurse nounwind
define void @fred(ptr nocapture %A, ptr nocapture %B, i32 %N, i32 %M) #0 {
entry:
%add = add nsw i32 %N, 5
%arrayidx = getelementptr inbounds i32, ptr %A, i32 %add
store i32 %M, ptr %arrayidx, align 4, !tbaa !1
%add2 = add nsw i32 %N, 6
%arrayidx3 = getelementptr inbounds i32, ptr %A, i32 %add2
store i32 %M, ptr %arrayidx3, align 4, !tbaa !1
%add4 = add nsw i32 %N, 35
%arrayidx5 = getelementptr inbounds i32, ptr %A, i32 %add4
store i32 %add, ptr %arrayidx5, align 4, !tbaa !1
%arrayidx8 = getelementptr inbounds [50 x i32], ptr %B, i32 %add, i32 %add
store i32 %add, ptr %arrayidx8, align 4, !tbaa !1
%inc = add nsw i32 %N, 6
%arrayidx8.1 = getelementptr inbounds [50 x i32], ptr %B, i32 %add, i32 %inc
store i32 %add, ptr %arrayidx8.1, align 4, !tbaa !1
%sub = add nsw i32 %N, 4
%arrayidx10 = getelementptr inbounds [50 x i32], ptr %B, i32 %add, i32 %sub
%0 = load i32, ptr %arrayidx10, align 4, !tbaa !1
%add11 = add nsw i32 %0, 1
store i32 %add11, ptr %arrayidx10, align 4, !tbaa !1
%1 = load i32, ptr %arrayidx, align 4, !tbaa !1
%add13 = add nsw i32 %N, 25
%arrayidx15 = getelementptr inbounds [50 x i32], ptr %B, i32 %add13, i32 %add
store i32 %1, ptr %arrayidx15, align 4, !tbaa !1
store i32 5, ptr @G, align 4, !tbaa !1
ret void
}
attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }
!1 = !{!2, !2, i64 0}
!2 = !{!"int", !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}