Files
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

83 lines
2.5 KiB
LLVM

; RUN: llc -mtriple=hexagon -mcpu=hexagonv67t < %s | FileCheck %s
; A simple test case for the tiny core instruction latency information.
; CHECK-LABEL: test
; CHECK-DAG: [[REG1:r([0-9]+)]] = memw([[REG0:r[0-9]+]]+#0)
; CHECK-DAG: [[REG2:r([0-9]+)]] = memw([[REG0]]+#4)
; CHECK-NEXT: }
; CHECK: {
; CHECK: {
; CHECK-NEXT: = add([[REG2]],[[REG1]])
define i32 @test(ptr nocapture readonly %p) local_unnamed_addr #0 {
entry:
%incdec.ptr = getelementptr inbounds i32, ptr %p, i32 1
%0 = load i32, ptr %p, align 4
%incdec.ptr1 = getelementptr inbounds i32, ptr %p, i32 2
%1 = load i32, ptr %incdec.ptr, align 4
%incdec.ptr2 = getelementptr inbounds i32, ptr %p, i32 3
%2 = load i32, ptr %incdec.ptr1, align 4
%3 = load i32, ptr %incdec.ptr2, align 4
%add = add nsw i32 %1, %0
%add4 = add nsw i32 %3, %2
%mul = mul nsw i32 %add4, %add
ret i32 %mul
}
; CHECK-LABEL: test1
; CHECK-DAG: [[REG4:r([0-9]+)]] = memw([[REG3:r[0-9]+]]+#0)
; CHECK-DAG: [[REG5:r([0-9]+)]] = memw([[REG3]]+#4)
; CHECK-NEXT: }
; CHECK: {
; CHECK: {
; CHECK-NEXT: [[REG7:r([0-9]+)]] = add([[REG5]],[[REG4]])
; CHECK: }
; CHECK-NEXT: {
; CHECK-NEXT: = sub([[REG7]]
define i32 @test1(ptr nocapture readonly %p) local_unnamed_addr #0 {
entry:
%incdec.ptr = getelementptr inbounds i32, ptr %p, i32 1
%0 = load i32, ptr %p, align 4
%incdec.ptr1 = getelementptr inbounds i32, ptr %p, i32 2
%1 = load i32, ptr %incdec.ptr, align 4
%incdec.ptr2 = getelementptr inbounds i32, ptr %p, i32 3
%2 = load i32, ptr %incdec.ptr1, align 4
%3 = load i32, ptr %incdec.ptr2, align 4
%add4.neg = add i32 %1, %0
%add = sub i32 %add4.neg, %2
%sub = sub i32 %add, %3
ret i32 %sub
}
; Test that multiplies are not placed in the same packet.
; CHECK-LABEL: test2
; CHECK: = mpyi
; CHECK: }
; CHECK: = mpyi
; CHECK: }
; CHECK: = mpyi
; CHECK: }
; CHECK: = mpyi
define i32 @test2(ptr nocapture readonly %p) local_unnamed_addr #1 {
entry:
%incdec.ptr = getelementptr inbounds i32, ptr %p, i32 1
%0 = load i32, ptr %p, align 4
%incdec.ptr1 = getelementptr inbounds i32, ptr %p, i32 2
%1 = load i32, ptr %incdec.ptr, align 4
%incdec.ptr2 = getelementptr inbounds i32, ptr %p, i32 3
%2 = load i32, ptr %incdec.ptr1, align 4
%3 = load i32, ptr %incdec.ptr2, align 4
%mul = mul nsw i32 %1, %0
%mul4 = mul nsw i32 %3, %2
%mul5 = mul nsw i32 %3, %0
%mul6 = mul nsw i32 %2, %1
%call = tail call i32 @foo(i32 %mul, i32 %mul4, i32 %mul5, i32 %mul6) #3
ret i32 %call
}
declare i32 @foo(i32, i32, i32, i32) local_unnamed_addr #2