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
94 lines
3.1 KiB
LLVM
94 lines
3.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc -mtriple=sparc < %s | FileCheck %s --check-prefixes=CHECK32
|
|
; RUN: llc -mtriple=sparcv9 < %s | FileCheck %s --check-prefixes=CHECK64
|
|
|
|
define void @variable_alloca_with_overalignment(i32 %num) nounwind {
|
|
; CHECK32-LABEL: variable_alloca_with_overalignment:
|
|
; CHECK32: ! %bb.0:
|
|
; CHECK32-NEXT: save %sp, -96, %sp
|
|
; CHECK32-NEXT: add %sp, 80, %i1
|
|
; CHECK32-NEXT: and %i1, -64, %o0
|
|
; CHECK32-NEXT: add %o0, -96, %sp
|
|
; CHECK32-NEXT: add %i0, 7, %i0
|
|
; CHECK32-NEXT: and %i0, -8, %i0
|
|
; CHECK32-NEXT: sub %sp, %i0, %i0
|
|
; CHECK32-NEXT: add %i0, -8, %sp
|
|
; CHECK32-NEXT: call foo
|
|
; CHECK32-NEXT: add %i0, 88, %o1
|
|
; CHECK32-NEXT: ret
|
|
; CHECK32-NEXT: restore
|
|
;
|
|
; CHECK64-LABEL: variable_alloca_with_overalignment:
|
|
; CHECK64: ! %bb.0:
|
|
; CHECK64-NEXT: save %sp, -128, %sp
|
|
; CHECK64-NEXT: add %sp, 2159, %i1
|
|
; CHECK64-NEXT: and %i1, -64, %o0
|
|
; CHECK64-NEXT: add %o0, -2175, %sp
|
|
; CHECK64-NEXT: srl %i0, 0, %i0
|
|
; CHECK64-NEXT: add %i0, 15, %i0
|
|
; CHECK64-NEXT: sethi 4194303, %i1
|
|
; CHECK64-NEXT: or %i1, 1008, %i1
|
|
; CHECK64-NEXT: sethi 0, %i2
|
|
; CHECK64-NEXT: or %i2, 1, %i2
|
|
; CHECK64-NEXT: sllx %i2, 32, %i2
|
|
; CHECK64-NEXT: or %i2, %i1, %i1
|
|
; CHECK64-NEXT: and %i0, %i1, %i0
|
|
; CHECK64-NEXT: sub %sp, %i0, %i0
|
|
; CHECK64-NEXT: add %i0, 2175, %o1
|
|
; CHECK64-NEXT: mov %i0, %sp
|
|
; CHECK64-NEXT: call foo
|
|
; CHECK64-NEXT: add %sp, -48, %sp
|
|
; CHECK64-NEXT: add %sp, 48, %sp
|
|
; CHECK64-NEXT: ret
|
|
; CHECK64-NEXT: restore
|
|
%aligned = alloca i32, align 64
|
|
%var_size = alloca i8, i32 %num, align 4
|
|
call void @foo(ptr %aligned, ptr %var_size)
|
|
ret void
|
|
}
|
|
|
|
;; Same but with the alloca itself overaligned
|
|
define void @variable_alloca_with_overalignment_2(i32 %num) nounwind {
|
|
; CHECK32-LABEL: variable_alloca_with_overalignment_2:
|
|
; CHECK32: ! %bb.0:
|
|
; CHECK32-NEXT: save %sp, -96, %sp
|
|
; CHECK32-NEXT: add %i0, 7, %i0
|
|
; CHECK32-NEXT: and %i0, -8, %i0
|
|
; CHECK32-NEXT: sub %sp, %i0, %i0
|
|
; CHECK32-NEXT: add %i0, 88, %i0
|
|
; CHECK32-NEXT: and %i0, -64, %o1
|
|
; CHECK32-NEXT: add %o1, -96, %sp
|
|
; CHECK32-NEXT: call foo
|
|
; CHECK32-NEXT: mov %g0, %o0
|
|
; CHECK32-NEXT: ret
|
|
; CHECK32-NEXT: restore
|
|
;
|
|
; CHECK64-LABEL: variable_alloca_with_overalignment_2:
|
|
; CHECK64: ! %bb.0:
|
|
; CHECK64-NEXT: save %sp, -128, %sp
|
|
; CHECK64-NEXT: srl %i0, 0, %i0
|
|
; CHECK64-NEXT: add %i0, 15, %i0
|
|
; CHECK64-NEXT: sethi 4194303, %i1
|
|
; CHECK64-NEXT: or %i1, 1008, %i1
|
|
; CHECK64-NEXT: sethi 0, %i2
|
|
; CHECK64-NEXT: or %i2, 1, %i2
|
|
; CHECK64-NEXT: sllx %i2, 32, %i2
|
|
; CHECK64-NEXT: or %i2, %i1, %i1
|
|
; CHECK64-NEXT: and %i0, %i1, %i0
|
|
; CHECK64-NEXT: sub %sp, %i0, %i0
|
|
; CHECK64-NEXT: add %i0, 2175, %i0
|
|
; CHECK64-NEXT: and %i0, -64, %o1
|
|
; CHECK64-NEXT: add %o1, -2175, %sp
|
|
; CHECK64-NEXT: add %sp, -48, %sp
|
|
; CHECK64-NEXT: call foo
|
|
; CHECK64-NEXT: mov %g0, %o0
|
|
; CHECK64-NEXT: add %sp, 48, %sp
|
|
; CHECK64-NEXT: ret
|
|
; CHECK64-NEXT: restore
|
|
%var_size = alloca i8, i32 %num, align 64
|
|
call void @foo(ptr null, ptr %var_size)
|
|
ret void
|
|
}
|
|
|
|
declare void @foo(ptr, ptr);
|