Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AArch64/GlobalISel/legalize-ptrtoint.mir
T
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

155 lines
4.3 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
...
---
name: p0_s64
body: |
bb.0:
liveins: $x0
; CHECK-LABEL: name: p0_s64
; CHECK: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: %int:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: $x0 = COPY %int(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%ptr:_(p0) = COPY $x0
%int:_(s64) = G_PTRTOINT %ptr
$x0 = COPY %int
RET_ReallyLR implicit $x0
...
---
name: p0_s32
body: |
bb.0:
liveins: $x0
; CHECK-LABEL: name: p0_s32
; CHECK: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: %int:_(s32) = G_TRUNC [[PTRTOINT]](s64)
; CHECK-NEXT: $w0 = COPY %int(s32)
; CHECK-NEXT: RET_ReallyLR implicit $w0
%ptr:_(p0) = COPY $x0
%int:_(s32) = G_PTRTOINT %ptr
$w0 = COPY %int
RET_ReallyLR implicit $w0
...
---
name: p0_s16
body: |
bb.0:
liveins: $x0, $h0
; CHECK-LABEL: name: p0_s16
; CHECK: liveins: $x0, $h0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: %int:_(s16) = G_TRUNC [[PTRTOINT]](s64)
; CHECK-NEXT: $h0 = COPY %int(s16)
; CHECK-NEXT: RET_ReallyLR implicit $h0
%ptr:_(p0) = COPY $x0
%int:_(s16) = G_PTRTOINT %ptr
$h0 = COPY %int
RET_ReallyLR implicit $h0
...
---
name: p0_s8
body: |
bb.0:
liveins: $x0, $b0
; CHECK-LABEL: name: p0_s8
; CHECK: liveins: $x0, $b0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: %int:_(s8) = G_TRUNC [[PTRTOINT]](s64)
; CHECK-NEXT: $b0 = COPY %int(s8)
; CHECK-NEXT: RET_ReallyLR implicit $b0
%ptr:_(p0) = COPY $x0
%int:_(s8) = G_PTRTOINT %ptr
$b0 = COPY %int
RET_ReallyLR implicit $b0
...
---
name: p0_s1
body: |
bb.0:
liveins: $x0
; CHECK-LABEL: name: p0_s1
; CHECK: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[PTRTOINT]](s64)
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
; CHECK-NEXT: %ext:_(s32) = G_AND [[TRUNC]], [[C]]
; CHECK-NEXT: $w0 = COPY %ext(s32)
; CHECK-NEXT: RET_ReallyLR implicit $w0
%ptr:_(p0) = COPY $x0
%int:_(s1) = G_PTRTOINT %ptr
%ext:_(s32) = G_ZEXT %int
$w0 = COPY %ext
RET_ReallyLR implicit $w0
...
---
name: p0_s128
body: |
bb.0:
liveins: $x0, $q0
; CHECK-LABEL: name: p0_s128
; CHECK: liveins: $x0, $q0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
; CHECK-NEXT: %int:_(s128) = G_MERGE_VALUES [[PTRTOINT]](s64), [[C]](s64)
; CHECK-NEXT: $q0 = COPY %int(s128)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%ptr:_(p0) = COPY $x0
%int:_(s128) = G_PTRTOINT %ptr
$q0 = COPY %int
RET_ReallyLR implicit $q0
...
---
name: p0_s88
body: |
bb.0:
liveins: $x0
; CHECK-LABEL: name: p0_s88
; CHECK: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT %ptr(p0)
; CHECK-NEXT: %trunc:_(s32) = G_TRUNC [[PTRTOINT]](s64)
; CHECK-NEXT: $w0 = COPY %trunc(s32)
; CHECK-NEXT: RET_ReallyLR implicit $w0
%ptr:_(p0) = COPY $x0
%int:_(s88) = G_PTRTOINT %ptr
%trunc:_(s32) = G_TRUNC %int
$w0 = COPY %trunc
RET_ReallyLR implicit $w0
...
---
name: v2s64_v2p0_legal
tracksRegLiveness: true
body: |
bb.0:
liveins: $q0
; CHECK-LABEL: name: v2s64_v2p0_legal
; CHECK: liveins: $q0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %ptr:_(<2 x p0>) = COPY $q0
; CHECK-NEXT: %int:_(<2 x s64>) = G_PTRTOINT %ptr(<2 x p0>)
; CHECK-NEXT: $q0 = COPY %int(<2 x s64>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%ptr:_(<2 x p0>) = COPY $q0
%int:_(<2 x s64>) = G_PTRTOINT %ptr(<2 x p0>)
$q0 = COPY %int(<2 x s64>)
RET_ReallyLR implicit $q0
...