Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Hexagon/idxload-with-zero-offset.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

71 lines
1.8 KiB
LLVM

; RUN: llc -mtriple=hexagon < %s | FileCheck %s
; Check that we generate load instruction with (base + register offset << x)
; load word
define i32 @load_w(ptr nocapture %a, i32 %n, i32 %m) nounwind {
; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}}+r{{[0-9]+}}<<#2)
entry:
%tmp = add i32 %n, %m
%scevgep9 = getelementptr i32, ptr %a, i32 %tmp
%val = load i32, ptr %scevgep9, align 4
ret i32 %val
}
; load unsigned half word
define i16 @load_uh(ptr nocapture %a, i32 %n, i32 %m) nounwind {
; CHECK: r{{[0-9]+}} = memuh(r{{[0-9]+}}+r{{[0-9]+}}<<#1)
entry:
%tmp = add i32 %n, %m
%scevgep9 = getelementptr i16, ptr %a, i32 %tmp
%val = load i16, ptr %scevgep9, align 2
ret i16 %val
}
; load signed half word
define i32 @load_h(ptr nocapture %a, i32 %n, i32 %m) nounwind {
; CHECK: r{{[0-9]+}} = memh(r{{[0-9]+}}+r{{[0-9]+}}<<#1)
entry:
%tmp = add i32 %n, %m
%scevgep9 = getelementptr i16, ptr %a, i32 %tmp
%val = load i16, ptr %scevgep9, align 2
%conv = sext i16 %val to i32
ret i32 %conv
}
; load unsigned byte
define i8 @load_ub(ptr nocapture %a, i32 %n, i32 %m) nounwind {
; CHECK: r{{[0-9]+}} = memub(r{{[0-9]+}}+r{{[0-9]+}}<<#0)
entry:
%tmp = add i32 %n, %m
%scevgep9 = getelementptr i8, ptr %a, i32 %tmp
%val = load i8, ptr %scevgep9, align 1
ret i8 %val
}
; load signed byte
define i32 @foo_2(ptr nocapture %a, i32 %n, i32 %m) nounwind {
; CHECK: r{{[0-9]+}} = memb(r{{[0-9]+}}+r{{[0-9]+}}<<#0)
entry:
%tmp = add i32 %n, %m
%scevgep9 = getelementptr i8, ptr %a, i32 %tmp
%val = load i8, ptr %scevgep9, align 1
%conv = sext i8 %val to i32
ret i32 %conv
}
; load doubleword
define i64 @load_d(ptr nocapture %a, i32 %n, i32 %m) nounwind {
; CHECK: r{{[0-9]+}}:{{[0-9]+}} = memd(r{{[0-9]+}}+r{{[0-9]+}}<<#3)
entry:
%tmp = add i32 %n, %m
%scevgep9 = getelementptr i64, ptr %a, i32 %tmp
%val = load i64, ptr %scevgep9, align 8
ret i64 %val
}