Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AArch64/GlobalISel/prelegalizer-combiner-binop-reassoc.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

125 lines
3.8 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
# Combins: (Opc (Opc X, C1), C2) -> (Opc X, (Opc C1, C2))
---
name: test1_add_move_inner_cst_to_fold
alignment: 4
tracksRegLiveness: true
liveins:
- { reg: '$x0' }
body: |
bb.1:
liveins: $x0
; CHECK-LABEL: name: test1_add_move_inner_cst_to_fold
; CHECK: liveins: $x0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %x:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 88
; CHECK-NEXT: %add_outer:_(s64) = G_ADD %x, [[C]]
; CHECK-NEXT: $x0 = COPY %add_outer(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%x:_(s64) = COPY $x0
%C1:_(s64) = G_CONSTANT i64 64
%C2:_(s64) = G_CONSTANT i64 24
%add_inner:_(s64) = G_ADD %x, %C1
%add_outer:_(s64) = G_ADD %add_inner, %C2
$x0 = COPY %add_outer
RET_ReallyLR implicit $x0
...
# (op (op x, c1), y) -> (op (op x, y), c1)
---
name: test2_add_move_inner_cst_to_rhs
alignment: 4
tracksRegLiveness: true
liveins:
- { reg: '$x0' }
body: |
bb.1:
liveins: $x0, $x1
; CHECK-LABEL: name: test2_add_move_inner_cst_to_rhs
; CHECK: liveins: $x0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %x:_(s64) = COPY $x0
; CHECK-NEXT: %C1:_(s64) = G_CONSTANT i64 64
; CHECK-NEXT: %y:_(s64) = COPY $x1
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD %x, %y
; CHECK-NEXT: %add_outer:_(s64) = G_ADD [[ADD]], %C1
; CHECK-NEXT: $x0 = COPY %add_outer(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%x:_(s64) = COPY $x0
%C1:_(s64) = G_CONSTANT i64 64
%y:_(s64) = COPY $x1
%add_inner:_(s64) = G_ADD %x, %C1
%add_outer:_(s64) = G_ADD %add_inner, %y
$x0 = COPY %add_outer
RET_ReallyLR implicit $x0
...
---
name: test2_add_move_inner_cst_to_rhs_multiuse
alignment: 4
tracksRegLiveness: true
liveins:
- { reg: '$x0' }
body: |
bb.1:
liveins: $x0, $x1
; CHECK-LABEL: name: test2_add_move_inner_cst_to_rhs_multiuse
; CHECK: liveins: $x0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %x:_(s64) = COPY $x0
; CHECK-NEXT: %C1:_(s64) = G_CONSTANT i64 64
; CHECK-NEXT: %y:_(s64) = COPY $x1
; CHECK-NEXT: %add_inner:_(s64) = G_ADD %x, %C1
; CHECK-NEXT: %add_outer:_(s64) = G_ADD %add_inner, %y
; CHECK-NEXT: $x0 = COPY %add_outer(s64)
; CHECK-NEXT: $x1 = COPY %add_inner(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%x:_(s64) = COPY $x0
%C1:_(s64) = G_CONSTANT i64 64
%y:_(s64) = COPY $x1
%add_inner:_(s64) = G_ADD %x, %C1
%add_outer:_(s64) = G_ADD %add_inner, %y
$x0 = COPY %add_outer
$x1 = COPY %add_inner
RET_ReallyLR implicit $x0
...
---
name: test2_add_move_inner_cst_to_rhs_vector
alignment: 4
tracksRegLiveness: true
liveins:
- { reg: '$x0' }
body: |
bb.1:
liveins: $q0, $q1
; CHECK-LABEL: name: test2_add_move_inner_cst_to_rhs_vector
; CHECK: liveins: $q0, $q1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %x:_(<2 x s64>) = COPY $q0
; CHECK-NEXT: %C1:_(s64) = G_CONSTANT i64 64
; CHECK-NEXT: %VEC_C1:_(<2 x s64>) = G_BUILD_VECTOR %C1(s64), %C1(s64)
; CHECK-NEXT: %y:_(<2 x s64>) = COPY $q1
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(<2 x s64>) = G_ADD %x, %y
; CHECK-NEXT: %add_outer:_(<2 x s64>) = G_ADD [[ADD]], %VEC_C1
; CHECK-NEXT: $q0 = COPY %add_outer(<2 x s64>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%x:_(<2 x s64>) = COPY $q0
%C1:_(s64) = G_CONSTANT i64 64
%VEC_C1:_(<2 x s64>) = G_BUILD_VECTOR %C1, %C1
%y:_(<2 x s64>) = COPY $q1
%add_inner:_(<2 x s64>) = G_ADD %x, %VEC_C1
%add_outer:_(<2 x s64>) = G_ADD %add_inner, %y
$q0 = COPY %add_outer
RET_ReallyLR implicit $q0
...