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

79 lines
2.2 KiB
LLVM

; RUN: llc -mtriple=xtensa -O1 -verify-machineinstrs < %s \
; RUN: | FileCheck %s -check-prefix=XTENSA
; Check placement of first 6 arguments in registers and 7th argument on stack
define dso_local i32 @test1(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr nocapture noundef readonly byval(i32) align 4 %6) {
; XTENSA-LABEL: @test1
; XTENSA: add a8, a7, a2
; XTENSA: l32i a9, a1, 0
; XTENSA: add a2, a8, a9
; XTENSA: ret
%8 = load i32, ptr %6, align 4
%9 = add nsw i32 %5, %0
%10 = add nsw i32 %9, %8
ret i32 %10
}
; Check placement of second i64 argument in registers
define dso_local i32 @test2(i32 noundef %0, i64 noundef %1, i32 noundef %2) {
; XTENSA-LABEL: @test2
; XTENSA: add a8, a6, a2
; XTENSA: add a2, a8, a4
; XTENSA: ret
%4 = trunc i64 %1 to i32
%5 = add nsw i32 %2, %0
%6 = add nsw i32 %5, %4
ret i32 %6
}
; Check placement of first argument typeof i8 in register
define dso_local i32 @test3(i8 noundef signext %0, i64 noundef %1, i32 noundef %2) {
; XTENSA-LABEL: @test3
; XTENSA: add a8, a2, a6
; XTENSA: add a2, a8, a4
; XTENSA: ret
%4 = trunc i64 %1 to i32
%5 = sext i8 %0 to i32
%6 = add nsw i32 %5, %2
%7 = add nsw i32 %6, %4
ret i32 %7
}
; Check placement of 4th argument typeof i64 on stack
define dso_local i32 @test4(i8 noundef signext %0, i64 noundef %1, i32 noundef %2, ptr nocapture noundef readonly byval(i64) align 8 %3) {
; XTENSA-LABEL: @test4
; XTENSA: add a8, a2, a6
; XTENSA: add a8, a8, a4
; XTENSA: l32i a9, a1, 0
; XTENSA: add a2, a8, a9
; XTENSA: ret
%5 = load i64, ptr %3, align 8
%6 = trunc i64 %1 to i32
%7 = trunc i64 %5 to i32
%8 = sext i8 %0 to i32
%9 = add nsw i32 %8, %2
%10 = add nsw i32 %9, %6
%11 = add nsw i32 %10, %7
ret i32 %11
}
; Check placement of 128 bit structure on registers
define dso_local i32 @test5([4 x i32] %0, i32 noundef %1) {
; XTENSA-LABEL: @test5
; XTENSA: add a2, a2, a6
; XTENSA: ret
%3 = extractvalue [4 x i32] %0, 0
%4 = add nsw i32 %3, %1
ret i32 %4
}
; Check placement of 128 bit structure on stack
define dso_local i32 @test6(i32 noundef %0, [4 x i32] %1) {
; XTENSA-LABEL: @test6
; XTENSA: add a2, a3, a2
; XTENSA: ret
%3 = extractvalue [4 x i32] %1, 0
%4 = add nsw i32 %3, %0
ret i32 %4
}