Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/GlobalISel/x86-select-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

144 lines
4.1 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=i386-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
--- |
define i1 @ptrtoint_s1_p0(ptr %p) {
entry:
%0 = ptrtoint ptr %p to i1
ret i1 %0
}
define i8 @ptrtoint_s8_p0(ptr %p) {
entry:
%0 = ptrtoint ptr %p to i8
ret i8 %0
}
define i16 @ptrtoint_s16_p0(ptr %p) {
entry:
%0 = ptrtoint ptr %p to i16
ret i16 %0
}
define i32 @ptrtoint_s32_p0(ptr %p) {
entry:
%0 = ptrtoint ptr %p to i32
ret i32 %0
}
...
---
name: ptrtoint_s1_p0
alignment: 16
legalized: true
regBankSelected: true
tracksRegLiveness: true
registers:
- { id: 0, class: gpr }
- { id: 1, class: gpr }
- { id: 2, class: gpr }
- { id: 3, class: gpr }
frameInfo:
maxAlignment: 4
fixedStack:
- { id: 0, size: 4, alignment: 16, stack-id: default, isImmutable: true }
body: |
bb.1.entry:
; CHECK-LABEL: name: ptrtoint_s1_p0
; CHECK: [[MOV32rm:%[0-9]+]]:gr32_abcd = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (invariant load (p0) from %fixed-stack.0, align 16)
; CHECK: [[COPY:%[0-9]+]]:gr8 = COPY [[MOV32rm]].sub_8bit
; CHECK: $al = COPY [[COPY]]
; CHECK: RET 0, implicit $al
%1:gpr(p0) = G_FRAME_INDEX %fixed-stack.0
%0:gpr(p0) = G_LOAD %1(p0) :: (invariant load (p0) from %fixed-stack.0, align 16)
%2:gpr(s1) = G_PTRTOINT %0(p0)
%3:gpr(s8) = G_ANYEXT %2(s1)
$al = COPY %3(s8)
RET 0, implicit $al
...
---
name: ptrtoint_s8_p0
alignment: 16
legalized: true
regBankSelected: true
tracksRegLiveness: true
registers:
- { id: 0, class: gpr }
- { id: 1, class: gpr }
- { id: 2, class: gpr }
frameInfo:
maxAlignment: 4
fixedStack:
- { id: 0, size: 4, alignment: 16, stack-id: default, isImmutable: true }
body: |
bb.1.entry:
; CHECK-LABEL: name: ptrtoint_s8_p0
; CHECK: [[MOV32rm:%[0-9]+]]:gr32_abcd = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (invariant load (p0) from %fixed-stack.0, align 16)
; CHECK: [[COPY:%[0-9]+]]:gr8 = COPY [[MOV32rm]].sub_8bit
; CHECK: $al = COPY [[COPY]]
; CHECK: RET 0, implicit $al
%1:gpr(p0) = G_FRAME_INDEX %fixed-stack.0
%0:gpr(p0) = G_LOAD %1(p0) :: (invariant load (p0) from %fixed-stack.0, align 16)
%2:gpr(s8) = G_PTRTOINT %0(p0)
$al = COPY %2(s8)
RET 0, implicit $al
...
---
name: ptrtoint_s16_p0
alignment: 16
legalized: true
regBankSelected: true
tracksRegLiveness: true
registers:
- { id: 0, class: gpr }
- { id: 1, class: gpr }
- { id: 2, class: gpr }
frameInfo:
maxAlignment: 4
fixedStack:
- { id: 0, size: 4, alignment: 16, stack-id: default, isImmutable: true }
body: |
bb.1.entry:
; CHECK-LABEL: name: ptrtoint_s16_p0
; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (invariant load (p0) from %fixed-stack.0, align 16)
; CHECK: [[COPY:%[0-9]+]]:gr16 = COPY [[MOV32rm]].sub_16bit
; CHECK: $ax = COPY [[COPY]]
; CHECK: RET 0, implicit $ax
%1:gpr(p0) = G_FRAME_INDEX %fixed-stack.0
%0:gpr(p0) = G_LOAD %1(p0) :: (invariant load (p0) from %fixed-stack.0, align 16)
%2:gpr(s16) = G_PTRTOINT %0(p0)
$ax = COPY %2(s16)
RET 0, implicit $ax
...
---
name: ptrtoint_s32_p0
alignment: 16
legalized: true
regBankSelected: true
tracksRegLiveness: true
registers:
- { id: 0, class: gpr }
- { id: 1, class: gpr }
- { id: 2, class: gpr }
frameInfo:
maxAlignment: 4
fixedStack:
- { id: 0, size: 4, alignment: 16, stack-id: default, isImmutable: true }
body: |
bb.1.entry:
; CHECK-LABEL: name: ptrtoint_s32_p0
; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (invariant load (p0) from %fixed-stack.0, align 16)
; CHECK: $eax = COPY [[MOV32rm]]
; CHECK: RET 0, implicit $eax
%1:gpr(p0) = G_FRAME_INDEX %fixed-stack.0
%0:gpr(p0) = G_LOAD %1(p0) :: (invariant load (p0) from %fixed-stack.0, align 16)
%2:gpr(s32) = G_PTRTOINT %0(p0)
$eax = COPY %2(s32)
RET 0, implicit $eax
...