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

159 lines
5.6 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NOFP16
...
---
name: s16_legal_with_full_fp16
alignment: 4
body: |
bb.0:
liveins: $h0, $h1
; CHECK-FP16-LABEL: name: s16_legal_with_full_fp16
; CHECK-FP16: liveins: $h0, $h1
; CHECK-FP16-NEXT: {{ $}}
; CHECK-FP16-NEXT: %a:_(f16) = COPY $h0
; CHECK-FP16-NEXT: %b:_(f16) = COPY $h1
; CHECK-FP16-NEXT: %minnum:_(f16) = G_FMINNUM %a, %b
; CHECK-FP16-NEXT: $h0 = COPY %minnum(f16)
; CHECK-FP16-NEXT: RET_ReallyLR implicit $h0
;
; CHECK-NOFP16-LABEL: name: s16_legal_with_full_fp16
; CHECK-NOFP16: liveins: $h0, $h1
; CHECK-NOFP16-NEXT: {{ $}}
; CHECK-NOFP16-NEXT: %a:_(f16) = COPY $h0
; CHECK-NOFP16-NEXT: %b:_(f16) = COPY $h1
; CHECK-NOFP16-NEXT: [[FPEXT:%[0-9]+]]:_(f32) = G_FPEXT %a(f16)
; CHECK-NOFP16-NEXT: [[FPEXT1:%[0-9]+]]:_(f32) = G_FPEXT %b(f16)
; CHECK-NOFP16-NEXT: [[FMINNUM:%[0-9]+]]:_(f32) = G_FMINNUM [[FPEXT]], [[FPEXT1]]
; CHECK-NOFP16-NEXT: %minnum:_(f16) = G_FPTRUNC [[FMINNUM]](f32)
; CHECK-NOFP16-NEXT: $h0 = COPY %minnum(f16)
; CHECK-NOFP16-NEXT: RET_ReallyLR implicit $h0
%a:_(f16) = COPY $h0
%b:_(f16) = COPY $h1
%minnum:_(f16) = G_FMINNUM %a, %b
$h0 = COPY %minnum(f16)
RET_ReallyLR implicit $h0
...
---
name: s32_legal
alignment: 4
body: |
bb.0:
liveins: $s0, $s1
; CHECK-LABEL: name: s32_legal
; CHECK: liveins: $s0, $s1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(f32) = COPY $s0
; CHECK-NEXT: %b:_(f32) = COPY $s1
; CHECK-NEXT: %minnum:_(f32) = G_FMINNUM %a, %b
; CHECK-NEXT: $s0 = COPY %minnum(f32)
; CHECK-NEXT: RET_ReallyLR implicit $s0
%a:_(f32) = COPY $s0
%b:_(f32) = COPY $s1
%minnum:_(f32) = G_FMINNUM %a, %b
$s0 = COPY %minnum(f32)
RET_ReallyLR implicit $s0
...
---
name: s64_legal
alignment: 4
body: |
bb.0:
liveins: $d0, $d1
; CHECK-LABEL: name: s64_legal
; CHECK: liveins: $d0, $d1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(f64) = COPY $d0
; CHECK-NEXT: %b:_(f64) = COPY $d1
; CHECK-NEXT: %minnum:_(f64) = G_FMINNUM %a, %b
; CHECK-NEXT: $d0 = COPY %minnum(f64)
; CHECK-NEXT: RET_ReallyLR implicit $d0
%a:_(f64) = COPY $d0
%b:_(f64) = COPY $d1
%minnum:_(f64) = G_FMINNUM %a, %b
$d0 = COPY %minnum(f64)
RET_ReallyLR implicit $d0
...
---
name: s128_libcall
alignment: 4
body: |
bb.0:
liveins: $q0, $q1
; CHECK-LABEL: name: s128_libcall
; CHECK: liveins: $q0, $q1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s128) = COPY $q0
; CHECK-NEXT: %b:_(s128) = COPY $q1
; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
; CHECK-NEXT: $q0 = COPY %a(s128)
; CHECK-NEXT: $q1 = COPY %b(s128)
; CHECK-NEXT: BL &fminl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
; CHECK-NEXT: %minnum:_(s128) = COPY $q0
; CHECK-NEXT: $q0 = COPY %minnum(s128)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%a:_(s128) = COPY $q0
%b:_(s128) = COPY $q1
%minnum:_(s128) = G_FMINNUM %a, %b
$q0 = COPY %minnum(s128)
RET_ReallyLR implicit $q0
...
---
name: v4s32_legal
alignment: 4
body: |
bb.0:
liveins: $q0, $q1
; CHECK-LABEL: name: v4s32_legal
; CHECK: liveins: $q0, $q1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(<4 x f32>) = COPY $q0
; CHECK-NEXT: %b:_(<4 x f32>) = COPY $q1
; CHECK-NEXT: %minnum:_(<4 x f32>) = G_FMINNUM %a, %b
; CHECK-NEXT: $q0 = COPY %minnum(<4 x f32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%a:_(<4 x f32>) = COPY $q0
%b:_(<4 x f32>) = COPY $q1
%minnum:_(<4 x f32>) = G_FMINNUM %a, %b
$q0 = COPY %minnum(<4 x f32>)
RET_ReallyLR implicit $q0
...
---
name: v3s32_widen
alignment: 4
body: |
bb.1.entry:
liveins: $q0, $q1
; CHECK-LABEL: name: v3s32_widen
; CHECK: liveins: $q0, $q1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x f64>) = COPY $q0
; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<4 x f32>) = G_BITCAST [[COPY]](<2 x f64>)
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x f64>) = COPY $q1
; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<4 x f32>) = G_BITCAST [[COPY1]](<2 x f64>)
; CHECK-NEXT: [[FMINNUM:%[0-9]+]]:_(<4 x f32>) = G_FMINNUM [[BITCAST]], [[BITCAST1]]
; CHECK-NEXT: $q0 = COPY [[FMINNUM]](<4 x f32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%2:_(<2 x f64>) = COPY $q0
%3:_(<4 x f32>) = G_BITCAST %2:_(<2 x f64>)
%4:_(f32), %5:_(f32), %6:_(f32), %7:_(f32) = G_UNMERGE_VALUES %3:_(<4 x f32>)
%0:_(<3 x f32>) = G_BUILD_VECTOR %4:_(f32), %5:_(f32), %6:_(f32)
%8:_(<2 x f64>) = COPY $q1
%9:_(<4 x f32>) = G_BITCAST %8:_(<2 x f64>)
%10:_(f32), %11:_(f32), %12:_(f32), %13:_(f32) = G_UNMERGE_VALUES %9:_(<4 x f32>)
%1:_(<3 x f32>) = G_BUILD_VECTOR %10:_(f32), %11:_(f32), %12:_(f32)
%14:_(<3 x f32>) = G_FMINNUM %0:_, %1:_
%15:_(f32), %16:_(f32), %17:_(f32) = G_UNMERGE_VALUES %14:_(<3 x f32>)
%18:_(f32) = G_IMPLICIT_DEF
%19:_(<4 x f32>) = G_BUILD_VECTOR %15:_(f32), %16:_(f32), %17:_(f32), %18:_(f32)
$q0 = COPY %19:_(<4 x f32>)
RET_ReallyLR implicit $q0
...