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
97 lines
2.7 KiB
LLVM
97 lines
2.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc -mtriple=riscv32-apple-none-macho < %s -verify-machineinstrs | FileCheck %s --check-prefixes=COMMON,DEFAULT
|
|
; RUN: llc -mtriple=riscv32-apple-none-macho < %s -relocation-model=static -verify-machineinstrs | FileCheck %s --check-prefixes=COMMON,STATIC
|
|
|
|
define void @simple() nounwind {
|
|
; COMMON-LABEL: simple:
|
|
; COMMON: ; %bb.0:
|
|
; COMMON-NEXT: ret
|
|
ret void
|
|
}
|
|
|
|
define void @call() nounwind {
|
|
; COMMON-LABEL: call:
|
|
; COMMON: ; %bb.0:
|
|
; COMMON-NEXT: addi sp, sp, -16
|
|
; COMMON-NEXT: sw ra, 12(sp) ; 4-byte Folded Spill
|
|
; COMMON-NEXT: call _tail_call
|
|
; COMMON-NEXT: lw ra, 12(sp) ; 4-byte Folded Reload
|
|
; COMMON-NEXT: addi sp, sp, 16
|
|
; COMMON-NEXT: ret
|
|
call void @tail_call()
|
|
ret void
|
|
}
|
|
|
|
define void @tail_call() nounwind {
|
|
; COMMON-LABEL: tail_call:
|
|
; COMMON: ; %bb.0:
|
|
; COMMON-NEXT: tail _call
|
|
tail call void @call()
|
|
ret void
|
|
}
|
|
|
|
@var = global i32 0
|
|
define ptr @direct_global() nounwind {
|
|
; DEFAULT-LABEL: direct_global:
|
|
; DEFAULT: ; %bb.0:
|
|
; DEFAULT-NEXT: Lpcrel_hi0:
|
|
; DEFAULT-NEXT: auipc a0, %pcrel_hi(_var)
|
|
; DEFAULT-NEXT: addi a0, a0, %pcrel_lo(Lpcrel_hi0)
|
|
; DEFAULT-NEXT: ret
|
|
;
|
|
; STATIC-LABEL: direct_global:
|
|
; STATIC: ; %bb.0:
|
|
; STATIC-NEXT: lui a0, %hi(_var)
|
|
; STATIC-NEXT: addi a0, a0, %lo(_var)
|
|
; STATIC-NEXT: ret
|
|
ret ptr @var
|
|
}
|
|
|
|
;; No GOTs in static CodeGen.
|
|
@var2 = external global i32
|
|
define ptr @got_global() nounwind {
|
|
; DEFAULT-LABEL: got_global:
|
|
; DEFAULT: ; %bb.0:
|
|
; DEFAULT-NEXT: Lpcrel_hi1:
|
|
; DEFAULT-NEXT: auipc a0, %got_pcrel_hi(_var2)
|
|
; DEFAULT-NEXT: lw a0, %pcrel_lo(Lpcrel_hi1)(a0)
|
|
; DEFAULT-NEXT: ret
|
|
;
|
|
; STATIC-LABEL: got_global:
|
|
; STATIC: ; %bb.0:
|
|
; STATIC-NEXT: lui a0, %hi(_var2)
|
|
; STATIC-NEXT: addi a0, a0, %lo(_var2)
|
|
; STATIC-NEXT: ret
|
|
ret ptr @var2
|
|
}
|
|
|
|
@anon = private unnamed_addr constant i32 42
|
|
define ptr @unnamed_const() nounwind {
|
|
; DEFAULT-LABEL: unnamed_const:
|
|
; DEFAULT: ; %bb.0:
|
|
; DEFAULT-NEXT: Lpcrel_hi2:
|
|
; DEFAULT-NEXT: auipc a0, %pcrel_hi(l_anon)
|
|
; DEFAULT-NEXT: addi a0, a0, %pcrel_lo(Lpcrel_hi2)
|
|
; DEFAULT-NEXT: ret
|
|
;
|
|
; STATIC-LABEL: unnamed_const:
|
|
; STATIC: ; %bb.0:
|
|
; STATIC-NEXT: lui a0, %hi(l_anon)
|
|
; STATIC-NEXT: addi a0, a0, %lo(l_anon)
|
|
; STATIC-NEXT: ret
|
|
ret ptr @anon
|
|
}
|
|
|
|
; UTC_ARGS: --disable
|
|
; COMMON-LABEL: l_anon:
|
|
; COMMON-NEXT: .word 42
|
|
|
|
; COMMON-LABEL: .section __DATA,__data
|
|
; COMMON-LABEL: _addend:
|
|
; COMMON-NEXT: .word _simple+42
|
|
@addend = global i32 add(i32 ptrtoint(ptr @simple to i32), i32 42)
|
|
|
|
; COMMON-LABEL: _sub:
|
|
; COMMON-NEXT: .word _simple-_call
|
|
@sub = global i32 sub(i32 ptrtoint(ptr @simple to i32), i32 ptrtoint(ptr @call to i32))
|