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

104 lines
3.3 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=xtensa -O1 -mattr=+windowed -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 %a, i32 noundef %b, i32 noundef %c, i32 noundef %d, i32 noundef %e, i32 noundef %f, ptr nocapture noundef readonly byval(i32) align 4 %p) {
; XTENSA-LABEL: test1:
; XTENSA: .cfi_startproc
; XTENSA-NEXT: # %bb.0:
; XTENSA-NEXT: entry a1, 32
; XTENSA-NEXT: .cfi_def_cfa_offset 32
; XTENSA-NEXT: add a8, a7, a2
; XTENSA-NEXT: l32i a9, a1, 32
; XTENSA-NEXT: add a2, a8, a9
; XTENSA-NEXT: retw
%l = load i32, ptr %p, align 4
%sum = add nsw i32 %f, %a
%1 = add nsw i32 %sum, %l
ret i32 %1
}
; Check placement of second i64 argument in registers
define dso_local i32 @test2(i32 noundef %a, i64 noundef %b, i32 noundef %c) {
; XTENSA-LABEL: test2:
; XTENSA: .cfi_startproc
; XTENSA-NEXT: # %bb.0:
; XTENSA-NEXT: entry a1, 32
; XTENSA-NEXT: .cfi_def_cfa_offset 32
; XTENSA-NEXT: add a8, a6, a2
; XTENSA-NEXT: add a2, a8, a4
; XTENSA-NEXT: retw
%tr = trunc i64 %b to i32
%sum = add nsw i32 %c, %a
%1 = add nsw i32 %sum, %tr
ret i32 %1
}
; Check placement of first argument typeof i8 in register
define dso_local i32 @test3(i8 noundef signext %a, i64 noundef %b, i32 noundef %c) {
; XTENSA-LABEL: test3:
; XTENSA: .cfi_startproc
; XTENSA-NEXT: # %bb.0:
; XTENSA-NEXT: entry a1, 32
; XTENSA-NEXT: .cfi_def_cfa_offset 32
; XTENSA-NEXT: add a8, a2, a6
; XTENSA-NEXT: add a2, a8, a4
; XTENSA-NEXT: retw
%tr = trunc i64 %b to i32
%se = sext i8 %a to i32
%sum = add nsw i32 %se, %c
%1 = add nsw i32 %sum, %tr
ret i32 %1
}
; Check placement of 4th argument typeof i64 on stack
define dso_local i32 @test4(i8 noundef signext %a, i64 noundef %b, i32 noundef %c, ptr nocapture noundef readonly byval(i64) align 8 %p) {
; XTENSA-LABEL: test4:
; XTENSA: .cfi_startproc
; XTENSA-NEXT: # %bb.0:
; XTENSA-NEXT: entry a1, 32
; XTENSA-NEXT: .cfi_def_cfa_offset 32
; XTENSA-NEXT: add a8, a2, a6
; XTENSA-NEXT: add a8, a8, a4
; XTENSA-NEXT: l32i a9, a1, 32
; XTENSA-NEXT: add a2, a8, a9
; XTENSA-NEXT: retw
%l = load i64, ptr %p, align 8
%tr1 = trunc i64 %b to i32
%tr2 = trunc i64 %l to i32
%se = sext i8 %a to i32
%sum1 = add nsw i32 %se, %c
%sum2 = add nsw i32 %sum1, %tr1
%1 = add nsw i32 %sum2, %tr2
ret i32 %1
}
; Check placement of 128 bit structure on registers
define dso_local i32 @test5([4 x i32] %a, i32 noundef %b) {
; XTENSA-LABEL: test5:
; XTENSA: .cfi_startproc
; XTENSA-NEXT: # %bb.0:
; XTENSA-NEXT: entry a1, 32
; XTENSA-NEXT: .cfi_def_cfa_offset 32
; XTENSA-NEXT: add a2, a2, a6
; XTENSA-NEXT: retw
%ev = extractvalue [4 x i32] %a, 0
%1 = add nsw i32 %ev, %b
ret i32 %1
}
; Check placement of 128 bit structure on stack
define dso_local i32 @test6(i32 noundef %a, [4 x i32] %b) {
; XTENSA-LABEL: test6:
; XTENSA: .cfi_startproc
; XTENSA-NEXT: # %bb.0:
; XTENSA-NEXT: entry a1, 32
; XTENSA-NEXT: .cfi_def_cfa_offset 32
; XTENSA-NEXT: add a2, a3, a2
; XTENSA-NEXT: retw
%ev = extractvalue [4 x i32] %b, 0
%1 = add nsw i32 %ev, %a
ret i32 %1
}