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
80 lines
2.5 KiB
LLVM
80 lines
2.5 KiB
LLVM
; RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s
|
|
|
|
@var32 = dso_local global [3 x i32] zeroinitializer
|
|
@var64 = dso_local global [3 x i64] zeroinitializer
|
|
@var32_align64 = dso_local global [3 x i32] zeroinitializer, align 8
|
|
@alias = dso_local alias [3 x i32], ptr @var32_align64
|
|
|
|
define dso_local i64 @test_align32() {
|
|
; CHECK-LABEL: test_align32:
|
|
|
|
; Since @var32 is only guaranteed to be aligned to 32-bits, it's invalid to
|
|
; emit an "LDR x0, [x0, #:lo12:var32] instruction to implement this load.
|
|
%val = load i64, ptr @var32
|
|
; CHECK: adrp [[HIBITS:x[0-9]+]], var32
|
|
; CHECK: add x[[ADDR:[0-9]+]], [[HIBITS]], {{#?}}:lo12:var32
|
|
; CHECK: ldr x0, [x[[ADDR]]]
|
|
|
|
ret i64 %val
|
|
}
|
|
|
|
define dso_local i64 @test_align64() {
|
|
; CHECK-LABEL: test_align64:
|
|
|
|
; However, var64 *is* properly aligned and emitting an adrp/add/ldr would be
|
|
; inefficient.
|
|
%val = load i64, ptr @var64
|
|
; CHECK: adrp x[[HIBITS:[0-9]+]], var64
|
|
; CHECK-NOT: add x[[HIBITS]]
|
|
; CHECK: ldr x0, [x[[HIBITS]], {{#?}}:lo12:var64]
|
|
|
|
ret i64 %val
|
|
}
|
|
|
|
define dso_local i64 @test_var32_align64() {
|
|
; CHECK-LABEL: test_var32_align64:
|
|
|
|
; Since @var32 is only guaranteed to be aligned to 32-bits, it's invalid to
|
|
; emit an "LDR x0, [x0, #:lo12:var32] instruction to implement this load.
|
|
%val = load i64, ptr @var32_align64
|
|
; CHECK: adrp x[[HIBITS:[0-9]+]], var32_align64
|
|
; CHECK-NOT: add x[[HIBITS]]
|
|
; CHECK: ldr x0, [x[[HIBITS]], {{#?}}:lo12:var32_align64]
|
|
|
|
ret i64 %val
|
|
}
|
|
|
|
define dso_local i64 @test_var32_alias() {
|
|
; CHECK-LABEL: test_var32_alias:
|
|
|
|
; We don't know anything about the alignment of aliases.
|
|
%val = load i64, ptr @alias
|
|
; CHECK: adrp x[[HIBITS:[0-9]+]], alias
|
|
; CHECK: add x[[ADDR:[0-9]+]], x[[HIBITS]], {{#?}}:lo12:alias
|
|
; CHECK: ldr x0, [x[[ADDR]]]
|
|
|
|
ret i64 %val
|
|
}
|
|
|
|
@yet_another_var = external dso_local global {i32, i32}
|
|
|
|
define dso_local i64 @test_yet_another_var() {
|
|
; CHECK-LABEL: test_yet_another_var:
|
|
|
|
; @yet_another_var has a preferred alignment of 8, but that's not enough if
|
|
; we're going to be linking against other things. Its ABI alignment is only 4
|
|
; so we can't fold the load.
|
|
%val = load i64, ptr @yet_another_var
|
|
; CHECK: adrp [[HIBITS:x[0-9]+]], yet_another_var
|
|
; CHECK: add x[[ADDR:[0-9]+]], [[HIBITS]], {{#?}}:lo12:yet_another_var
|
|
; CHECK: ldr x0, [x[[ADDR]]]
|
|
ret i64 %val
|
|
}
|
|
|
|
define dso_local ptr @test_functions() {
|
|
; CHECK-LABEL: test_functions:
|
|
ret ptr @test_yet_another_var
|
|
; CHECK: adrp [[HIBITS:x[0-9]+]], test_yet_another_var
|
|
; CHECK: add x0, [[HIBITS]], {{#?}}:lo12:test_yet_another_var
|
|
}
|