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
122 lines
3.1 KiB
YAML
122 lines
3.1 KiB
YAML
# RUN: llc -mtriple=x86_64 -run-pass none -o - %s | FileCheck %s
|
|
# This test ensures that the MIR parser parses the block address operands
|
|
# correctly.
|
|
|
|
--- |
|
|
|
|
@addr = global ptr null
|
|
|
|
define void @test() {
|
|
entry:
|
|
store volatile ptr blockaddress(@test, %block), ptr @addr
|
|
%val = load volatile ptr, ptr @addr
|
|
indirectbr ptr %val, [label %block]
|
|
|
|
block:
|
|
ret void
|
|
}
|
|
|
|
define void @test2() {
|
|
entry:
|
|
store volatile ptr blockaddress(@test2, %"quoted block"), ptr @addr
|
|
%val = load volatile ptr, ptr @addr
|
|
indirectbr ptr %val, [label %"quoted block"]
|
|
|
|
"quoted block":
|
|
ret void
|
|
}
|
|
|
|
define void @slot_in_other_function(ptr %addr) {
|
|
entry:
|
|
store volatile ptr blockaddress(@test3, %0), ptr %addr
|
|
ret void
|
|
}
|
|
|
|
define void @test3() {
|
|
entry:
|
|
store volatile ptr blockaddress(@test3, %0), ptr @addr
|
|
%val = load volatile ptr, ptr @addr
|
|
indirectbr ptr %val, [label %0]
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @test4() {
|
|
entry:
|
|
store volatile ptr blockaddress(@test4, %block), ptr @addr
|
|
%val = load volatile ptr, ptr @addr
|
|
indirectbr ptr %val, [label %block]
|
|
|
|
block:
|
|
ret void
|
|
}
|
|
|
|
...
|
|
---
|
|
name: test
|
|
body: |
|
|
bb.0.entry:
|
|
successors: %bb.1.block
|
|
; CHECK: $rax = LEA64r $rip, 1, $noreg, blockaddress(@test, %ir-block.block), $noreg
|
|
$rax = LEA64r $rip, 1, _, blockaddress(@test, %ir-block.block), _
|
|
MOV64mr $rip, 1, _, @addr, _, killed $rax
|
|
JMP64m $rip, 1, _, @addr, _
|
|
|
|
bb.1.block (ir-block-address-taken %ir-block.block):
|
|
RET64
|
|
...
|
|
---
|
|
name: test2
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0.entry:
|
|
successors: %bb.1
|
|
; CHECK: $rax = LEA64r $rip, 1, $noreg, blockaddress(@test2, %ir-block."quoted block"), $noreg
|
|
$rax = LEA64r $rip, 1, _, blockaddress(@test2, %ir-block."quoted block"), _
|
|
MOV64mr $rip, 1, _, @addr, _, killed $rax
|
|
JMP64m $rip, 1, _, @addr, _
|
|
|
|
bb.1 (%ir-block."quoted block", ir-block-address-taken %ir-block."quoted block"):
|
|
RET64
|
|
...
|
|
---
|
|
name: slot_in_other_function
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: $rdi
|
|
; CHECK-LABEL: name: slot_in_other_function
|
|
; CHECK: $rax = LEA64r $rip, 1, $noreg, blockaddress(@test3, %ir-block.0), $noreg
|
|
$rax = LEA64r $rip, 1, _, blockaddress(@test3, %ir-block.0), _
|
|
MOV64mr killed $rdi, 1, _, 0, _, killed $rax
|
|
RET64
|
|
...
|
|
---
|
|
name: test3
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0.entry:
|
|
successors: %bb.1
|
|
; CHECK-LABEL: name: test3
|
|
; CHECK: $rax = LEA64r $rip, 1, $noreg, blockaddress(@test3, %ir-block.0), $noreg
|
|
$rax = LEA64r $rip, 1, _, blockaddress(@test3, %ir-block.0), _
|
|
MOV64mr $rip, 1, _, @addr, _, killed $rax
|
|
JMP64m $rip, 1, _, @addr, _
|
|
|
|
bb.1 (%ir-block.0, ir-block-address-taken %ir-block.0):
|
|
RET64
|
|
...
|
|
---
|
|
name: test4
|
|
body: |
|
|
bb.0.entry:
|
|
successors: %bb.1.block
|
|
; CHECK: $rax = LEA64r $rip, 1, $noreg, blockaddress(@test, %ir-block.block) + 2, $noreg
|
|
$rax = LEA64r $rip, 1, _, blockaddress(@test, %ir-block.block) + 2, _
|
|
MOV64mr $rip, 1, _, @addr, _, killed $rax
|
|
JMP64m $rip, 1, _, @addr, _
|
|
|
|
bb.1.block (ir-block-address-taken %ir-block.block):
|
|
RET64
|
|
...
|