Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AArch64/GlobalISel/select-store-truncating-float.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

119 lines
3.2 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
--- |
define void @truncating_f32(double %x) {
%alloca = alloca i32, align 4
%bitcast = bitcast double %x to i64
%trunc = trunc i64 %bitcast to i32
store i32 %trunc, ptr %alloca, align 4
ret void
}
define void @truncating_f16(double %x) {
%alloca = alloca i16, align 2
%bitcast = bitcast double %x to i64
%trunc = trunc i64 %bitcast to i16
store i16 %trunc, ptr %alloca, align 2
ret void
}
define void @truncating_f8(double %x) {
%alloca = alloca i8, align 1
%bitcast = bitcast double %x to i64
%trunc = trunc i64 %bitcast to i8
store i8 %trunc, ptr %alloca, align 1
ret void
}
...
---
name: truncating_f32
alignment: 4
legalized: true
regBankSelected: true
tracksRegLiveness: true
liveins:
- { reg: '$d0' }
frameInfo:
maxAlignment: 4
stack:
- { id: 0, name: alloca, size: 4, alignment: 4 }
machineFunctionInfo: {}
body: |
bb.1 (%ir-block.0):
liveins: $d0
; CHECK-LABEL: name: truncating_f32
; CHECK: liveins: $d0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr32 = COPY [[COPY]].ssub
; CHECK-NEXT: STRSui [[COPY1]], %stack.0.alloca, 0 :: (store (s32) into %ir.alloca)
; CHECK-NEXT: RET_ReallyLR
%0:fpr(s64) = COPY $d0
%1:gpr(p0) = G_FRAME_INDEX %stack.0.alloca
G_STORE %0(s64), %1(p0) :: (store (s32) into %ir.alloca)
RET_ReallyLR
...
---
name: truncating_f16
alignment: 4
legalized: true
regBankSelected: true
tracksRegLiveness: true
liveins:
- { reg: '$d0' }
frameInfo:
maxAlignment: 2
stack:
- { id: 0, name: alloca, size: 2, alignment: 2 }
machineFunctionInfo: {}
body: |
bb.1 (%ir-block.0):
liveins: $d0
; CHECK-LABEL: name: truncating_f16
; CHECK: liveins: $d0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr16 = COPY [[COPY]].hsub
; CHECK-NEXT: STRHui [[COPY1]], %stack.0.alloca, 0 :: (store (s16) into %ir.alloca)
; CHECK-NEXT: RET_ReallyLR
%0:fpr(s64) = COPY $d0
%1:gpr(p0) = G_FRAME_INDEX %stack.0.alloca
G_STORE %0(s64), %1(p0) :: (store (s16) into %ir.alloca)
RET_ReallyLR
...
---
name: truncating_f8
alignment: 4
legalized: true
regBankSelected: true
tracksRegLiveness: true
liveins:
- { reg: '$d0' }
frameInfo:
maxAlignment: 1
stack:
- { id: 0, name: alloca, size: 1, alignment: 1 }
machineFunctionInfo: {}
body: |
bb.1 (%ir-block.0):
liveins: $d0
; CHECK-LABEL: name: truncating_f8
; CHECK: liveins: $d0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr8 = COPY [[COPY]].bsub
; CHECK-NEXT: STRBui [[COPY1]], %stack.0.alloca, 0 :: (store (s8) into %ir.alloca)
; CHECK-NEXT: RET_ReallyLR
%0:fpr(s64) = COPY $d0
%1:gpr(p0) = G_FRAME_INDEX %stack.0.alloca
G_STORE %0(s64), %1(p0) :: (store (s8) into %ir.alloca)
RET_ReallyLR
...