Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AArch64/GlobalISel/combine-canonicalize-icmp.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

96 lines
4.0 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -o - -mtriple=aarch64-unknown-unknown -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s | FileCheck %s --check-prefixes=CHECK
---
name: test_icmp_canon
body: |
bb.1:
; CHECK-LABEL: name: test_icmp_canon
; CHECK: %lhs:_(s64) = G_CONSTANT i64 11
; CHECK-NEXT: %rhs:_(s64) = COPY $x0
; CHECK-NEXT: %res:_(s32) = G_ICMP intpred(sgt), %rhs(s64), %lhs
; CHECK-NEXT: $w0 = COPY %res(s32)
%lhs:_(s64) = G_CONSTANT i64 11
%rhs:_(s64) = COPY $x0
%res:_(s32) = G_ICMP intpred(slt), %lhs(s64), %rhs
$w0 = COPY %res(s32)
...
---
name: test_icmp_no_canon
body: |
bb.1:
; CHECK-LABEL: name: test_icmp_no_canon
; CHECK: %lhs:_(s64) = COPY $x0
; CHECK-NEXT: %rhs:_(s64) = G_CONSTANT i64 11
; CHECK-NEXT: %res:_(s32) = G_ICMP intpred(slt), %lhs(s64), %rhs
; CHECK-NEXT: $w0 = COPY %res(s32)
%lhs:_(s64) = COPY $x0
%rhs:_(s64) = G_CONSTANT i64 11
%res:_(s32) = G_ICMP intpred(slt), %lhs(s64), %rhs
$w0 = COPY %res(s32)
...
---
name: test_icmp_canon_bv
body: |
bb.1:
; CHECK-LABEL: name: test_icmp_canon_bv
; CHECK: %opaque1:_(s64) = COPY $x0
; CHECK-NEXT: %opaque2:_(s64) = COPY $x0
; CHECK-NEXT: %const1:_(s64) = G_CONSTANT i64 11
; CHECK-NEXT: %const2:_(s64) = G_CONSTANT i64 12
; CHECK-NEXT: %lhs:_(<2 x s64>) = G_BUILD_VECTOR %const1(s64), %const2(s64)
; CHECK-NEXT: %rhs:_(<2 x s64>) = G_BUILD_VECTOR %opaque1(s64), %opaque2(s64)
; CHECK-NEXT: %res:_(<2 x s32>) = G_ICMP intpred(sgt), %rhs(<2 x s64>), %lhs
; CHECK-NEXT: $x0 = COPY %res(<2 x s32>)
%opaque1:_(s64) = COPY $x0
%opaque2:_(s64) = COPY $x0
%const1:_(s64) = G_CONSTANT i64 11
%const2:_(s64) = G_CONSTANT i64 12
%lhs:_(<2 x s64>) = G_BUILD_VECTOR %const1(s64), %const2(s64)
%rhs:_(<2 x s64>) = G_BUILD_VECTOR %opaque1(s64), %opaque2(s64)
%res:_(<2 x s32>) = G_ICMP intpred(slt), %lhs(<2 x s64>), %rhs
$x0 = COPY %res(<2 x s32>)
...
---
name: test_icmp_no_canon_bv_neither_const
body: |
bb.1:
; CHECK-LABEL: name: test_icmp_no_canon_bv_neither_const
; CHECK: %opaque1:_(s64) = COPY $x0
; CHECK-NEXT: %opaque2:_(s64) = COPY $x0
; CHECK-NEXT: %const1:_(s64) = G_CONSTANT i64 11
; CHECK-NEXT: %const2:_(s64) = G_CONSTANT i64 12
; CHECK-NEXT: %lhs:_(<2 x s64>) = G_BUILD_VECTOR %const1(s64), %opaque2(s64)
; CHECK-NEXT: %rhs:_(<2 x s64>) = G_BUILD_VECTOR %opaque1(s64), %const2(s64)
; CHECK-NEXT: %res:_(<2 x s32>) = G_ICMP intpred(slt), %lhs(<2 x s64>), %rhs
; CHECK-NEXT: $x0 = COPY %res(<2 x s32>)
%opaque1:_(s64) = COPY $x0
%opaque2:_(s64) = COPY $x0
%const1:_(s64) = G_CONSTANT i64 11
%const2:_(s64) = G_CONSTANT i64 12
%lhs:_(<2 x s64>) = G_BUILD_VECTOR %const1(s64), %opaque2(s64)
%rhs:_(<2 x s64>) = G_BUILD_VECTOR %opaque1(s64), %const2(s64)
%res:_(<2 x s32>) = G_ICMP intpred(slt), %lhs(<2 x s64>), %rhs
$x0 = COPY %res(<2 x s32>)
...
---
name: test_icmp_canon_splat
body: |
bb.1:
; CHECK-LABEL: name: test_icmp_canon_splat
; CHECK: %const:_(s64) = G_CONSTANT i64 11
; CHECK-NEXT: %lhs:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR %const(s64)
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x1
; CHECK-NEXT: %rhs:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR [[COPY]](s64)
; CHECK-NEXT: %res:_(<vscale x 2 x s32>) = G_ICMP intpred(sgt), %rhs(<vscale x 2 x s64>), %lhs
; CHECK-NEXT: %z:_(<vscale x 2 x s64>) = G_ZEXT %res(<vscale x 2 x s32>)
; CHECK-NEXT: $z0 = COPY %z(<vscale x 2 x s64>)
%const:_(s64) = G_CONSTANT i64 11
%lhs:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR %const:_(s64)
%1:_(s64) = COPY $x1
%rhs:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR %1:_(s64)
%res:_(<vscale x 2 x s32>) = G_ICMP intpred(slt), %lhs(<vscale x 2 x s64>), %rhs
%z:_(<vscale x 2 x s64>) = G_ZEXT %res
$z0 = COPY %z(<vscale x 2 x s64>)
...