Files
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

588 lines
15 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner %s -o - | FileCheck %s
---
name: APlusBMinusCMinusB
body: |
bb.0:
liveins: $x0, $x1, $x2
; CHECK-LABEL: name: APlusBMinusCMinusB
; CHECK: liveins: $x0, $x1, $x2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %sub:_(s64) = G_SUB %a, %c
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%sub1:_(s64) = G_SUB %b, %c
%add1:_(s64) = G_ADD %a, %sub1
%sub:_(s64) = G_SUB %add1, %b
$x0 = COPY %sub
RET_ReallyLR implicit $x0
...
---
name: AMinusBMinusCMinusC
body: |
bb.0:
liveins: $x0, $x1, $x2
; CHECK-LABEL: name: AMinusBMinusCMinusC
; CHECK: liveins: $x0, $x1, $x2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %sub:_(s64) = G_SUB %a, %b
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%sub1:_(s64) = G_SUB %b, %c
%sub2:_(s64) = G_SUB %a, %sub1
%sub:_(s64) = G_SUB %sub2, %c
$x0 = COPY %sub
RET_ReallyLR implicit $x0
...
---
name: ZeroMinusAPlusB
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: ZeroMinusAPlusB
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s32) = COPY $w0
; CHECK-NEXT: %b:_(s32) = COPY $w0
; CHECK-NEXT: %add:_(s32) = G_SUB %b, %a
; CHECK-NEXT: $w0 = COPY %add(s32)
; CHECK-NEXT: RET_ReallyLR implicit $w0
%x:_(s32) = COPY $w0
%a:_(s32) = COPY $w0
%b:_(s32) = COPY $w0
%zero:_(s32) = G_CONSTANT i32 0
%sub:_(s32) = G_SUB %zero, %a
%add:_(s32) = G_ADD %sub, %b
$w0 = COPY %add
RET_ReallyLR implicit $w0
...
---
name: ZeroMinusAPlusB_multi_use
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: ZeroMinusAPlusB_multi_use
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s32) = COPY $w0
; CHECK-NEXT: %b:_(s32) = COPY $w0
; CHECK-NEXT: %zero:_(s32) = G_CONSTANT i32 0
; CHECK-NEXT: %sub:_(s32) = G_SUB %zero, %a
; CHECK-NEXT: %add:_(s32) = G_SUB %b, %a
; CHECK-NEXT: $w0 = COPY %add(s32)
; CHECK-NEXT: $w0 = COPY %sub(s32)
; CHECK-NEXT: RET_ReallyLR implicit $w0
%x:_(s32) = COPY $w0
%a:_(s32) = COPY $w0
%b:_(s32) = COPY $w0
%zero:_(s32) = G_CONSTANT i32 0
%sub:_(s32) = G_SUB %zero, %a
%add:_(s32) = G_ADD %sub, %b
$w0 = COPY %add
$w0 = COPY %sub
RET_ReallyLR implicit $w0
...
---
name: APlusZeroMiunusB
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: APlusZeroMiunusB
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x1
; CHECK-NEXT: %b:_(s64) = COPY $x2
; CHECK-NEXT: %add:_(s64) = G_SUB %a, %b
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%x:_(s64) = COPY $x0
%a:_(s64) = COPY $x1
%b:_(s64) = COPY $x2
%zero:_(s64) = G_CONSTANT i64 0
%sub:_(s64) = G_SUB %zero, %b
%add:_(s64) = G_ADD %a, %sub
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: APlusBMinusB
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: APlusBMinusB
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: $x0 = COPY %b(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%zero:_(s64) = G_CONSTANT i64 0
%sub:_(s64) = G_SUB %b, %a
%add:_(s64) = G_ADD %a, %sub
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: BMinusAPlusA
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: BMinusAPlusA
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: $x0 = COPY %b(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%zero:_(s64) = G_CONSTANT i64 0
%sub:_(s64) = G_SUB %b, %a
%add:_(s64) = G_ADD %sub, %a
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: AMinusBPlusCMinusA
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: AMinusBPlusCMinusA
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %add:_(s64) = G_SUB %c, %b
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%zero:_(s64) = G_CONSTANT i64 0
%sub2:_(s64) = G_SUB %c, %a
%sub1:_(s64) = G_SUB %a, %b
%add:_(s64) = G_ADD %sub1, %sub2
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: AMinusBPlusBMinusC
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: AMinusBPlusBMinusC
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %add:_(s64) = G_SUB %a, %c
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%zero:_(s64) = G_CONSTANT i64 0
%sub2:_(s64) = G_SUB %b, %c
%sub1:_(s64) = G_SUB %a, %b
%add:_(s64) = G_ADD %sub1, %sub2
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: APlusBMinusAplusC
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: APlusBMinusAplusC
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %add:_(s64) = G_SUB %b, %c
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%zero:_(s64) = G_CONSTANT i64 0
%add1:_(s64) = G_ADD %a, %c
%sub1:_(s64) = G_SUB %b, %add1
%add:_(s64) = G_ADD %a, %sub1
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: APlusBMinusCPlusA
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: APlusBMinusCPlusA
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %add:_(s64) = G_SUB %b, %c
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%zero:_(s64) = G_CONSTANT i64 0
%add1:_(s64) = G_ADD %c, %a
%sub1:_(s64) = G_SUB %b, %add1
%add:_(s64) = G_ADD %a, %sub1
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: APlusBMinusCPlusA_BV
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: APlusBMinusCPlusA_BV
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a1:_(s64) = COPY $x0
; CHECK-NEXT: %b1:_(s64) = COPY $x1
; CHECK-NEXT: %c1:_(s64) = COPY $x2
; CHECK-NEXT: %b:_(<2 x s64>) = G_BUILD_VECTOR %b1(s64), %ba:_(s64)
; CHECK-NEXT: %c:_(<2 x s64>) = G_BUILD_VECTOR %a1(s64), %c1(s64)
; CHECK-NEXT: %add:_(<2 x s64>) = G_SUB %b, %c
; CHECK-NEXT: $q0 = COPY %add(<2 x s64>)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a1:_(s64) = COPY $x0
%b1:_(s64) = COPY $x1
%c1:_(s64) = COPY $x2
%a:_(<2 x s64>) = G_BUILD_VECTOR %a1:_(s64), %b1:_(s64)
%b:_(<2 x s64>) = G_BUILD_VECTOR %b1:_(s64), %ba:_(s64)
%c:_(<2 x s64>) = G_BUILD_VECTOR %a1:_(s64), %c1:_(s64)
%zero:_(s64) = G_CONSTANT i64 0
%add1:_(<2 x s64>) = G_ADD %c, %a
%sub1:_(<2 x s64>) = G_SUB %b, %add1
%add:_(<2 x s64>) = G_ADD %a, %sub1
$q0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: APlusC1MinusC2
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: APlusC1MinusC2
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -2
; CHECK-NEXT: %sub:_(s64) = G_ADD %a, [[C]]
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%c1:_(s64) = G_CONSTANT i64 5
%c2:_(s64) = G_CONSTANT i64 7
%add:_(s64) = G_ADD %a, %c1
%sub:_(s64) = G_SUB %add, %c2
$x0 = COPY %sub
RET_ReallyLR implicit $x0
...
---
name: C2MinusAPlusC1
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: C2MinusAPlusC1
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
; CHECK-NEXT: %sub:_(s64) = G_SUB [[C]], %a
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%c1:_(s64) = G_CONSTANT i64 4
%c2:_(s64) = G_CONSTANT i64 9
%add:_(s64) = G_ADD %a, %c1
%sub:_(s64) = G_SUB %c2, %add
$x0 = COPY %sub
RET_ReallyLR implicit $x0
...
---
name: AMinusC1MinusC2
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: AMinusC1MinusC2
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -71
; CHECK-NEXT: %sub:_(s64) = G_ADD %a, [[C]]
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%c1:_(s64) = G_CONSTANT i64 11
%c2:_(s64) = G_CONSTANT i64 60
%sub1:_(s64) = G_SUB %a, %c1
%sub:_(s64) = G_SUB %sub1, %c2
$x0 = COPY %sub
RET_ReallyLR implicit $x0
...
---
name: C1Minus2MinusC2
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: C1Minus2MinusC2
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -49
; CHECK-NEXT: %sub:_(s64) = G_SUB [[C]], %a
; CHECK-NEXT: $x0 = COPY %sub(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%c1:_(s64) = G_CONSTANT i64 11
%c2:_(s64) = G_CONSTANT i64 60
%sub1:_(s64) = G_SUB %c1, %a
%sub:_(s64) = G_SUB %sub1, %c2
$x0 = COPY %sub
RET_ReallyLR implicit $x0
...
---
name: AMinusC2PlusC2
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: AMinusC2PlusC2
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 43
; CHECK-NEXT: %add:_(s64) = G_ADD %a, [[C]]
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%c1:_(s64) = G_CONSTANT i64 13
%c2:_(s64) = G_CONSTANT i64 56
%sub:_(s64) = G_SUB %a, %c1
%add:_(s64) = G_ADD %sub, %c2
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: AMinusBMinusC_oneUse
body: |
bb.0:
liveins: $x0, $x1, $x2
; CHECK-LABEL: name: AMinusBMinusC_oneUse
; CHECK: liveins: $x0, $x1, $x2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %sub1:_(s64) = G_SUB %b, %c
; CHECK-NEXT: %sub2:_(s64) = G_SUB %a, %sub1
; CHECK-NEXT: %mul:_(s64) = G_MUL %sub2, %sub1
; CHECK-NEXT: $x0 = COPY %mul(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%sub1:_(s64) = G_SUB %b, %c
%sub2:_(s64) = G_SUB %a, %sub1
%mul:_(s64) = G_MUL %sub2, %sub1
$x0 = COPY %mul
RET_ReallyLR implicit $x0
...
---
name: AMinusBMinusC_multi
body: |
bb.0:
liveins: $x0, $x1, $x2
; CHECK-LABEL: name: AMinusBMinusC_multi
; CHECK: liveins: $x0, $x1, $x2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: %sub1:_(s64) = G_SUB %b, %c
; CHECK-NEXT: %sub2:_(s64) = G_SUB %a, %sub1
; CHECK-NEXT: %mul:_(s64) = G_MUL %sub2, %sub1
; CHECK-NEXT: %add:_(s64) = G_ADD %mul, %sub1
; CHECK-NEXT: $x0 = COPY %add(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%sub1:_(s64) = G_SUB %b, %c
%sub2:_(s64) = G_SUB %a, %sub1
%mul:_(s64) = G_MUL %sub2, %sub1
%add:_(s64) = G_ADD %mul, %sub1
$x0 = COPY %add
RET_ReallyLR implicit $x0
...
---
name: AMinusBMinusC
body: |
bb.0:
liveins: $x0, $x1, $x2
; CHECK-LABEL: name: AMinusBMinusC
; CHECK: liveins: $x0, $x1, $x2
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %c:_(s64) = COPY $x2
; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB %c, %b
; CHECK-NEXT: %sub2:_(s64) = G_ADD %a, [[SUB]]
; CHECK-NEXT: $x0 = COPY %sub2(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c:_(s64) = COPY $x2
%sub1:_(s64) = G_SUB %b, %c
%sub2:_(s64) = G_SUB %a, %sub1
$x0 = COPY %sub2
RET_ReallyLR implicit $x0
...
---
name: AMinusZeroMinusB
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: AMinusZeroMinusB
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(s64) = COPY $x0
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: %sub2:_(s64) = G_ADD %a, %b
; CHECK-NEXT: $x0 = COPY %sub2(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%c1:_(s64) = G_CONSTANT i64 0
%sub1:_(s64) = G_SUB %c1, %b
%sub2:_(s64) = G_SUB %a, %sub1
$x0 = COPY %sub2
RET_ReallyLR implicit $x0
...
---
name: AMinusZeroMinusB_BV
body: |
bb.0:
liveins: $q0, $q1
; CHECK-LABEL: name: AMinusZeroMinusB_BV
; CHECK: liveins: $q0, $q1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %a:_(<4 x s32>) = COPY $q0
; CHECK-NEXT: %b:_(<4 x s32>) = COPY $q1
; CHECK-NEXT: %sub2:_(<4 x s32>) = G_ADD %a, %b
; CHECK-NEXT: $q0 = COPY %sub2(<4 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%a:_(<4 x s32>) = COPY $q0
%b:_(<4 x s32>) = COPY $q1
%c:_(s32) = G_CONSTANT i32 0
%c1:_(<4 x s32>) = G_BUILD_VECTOR %c(s32), %c(s32), %c(s32), %c(s32)
%sub1:_(<4 x s32>) = G_SUB %c1, %b
%sub2:_(<4 x s32>) = G_SUB %a, %sub1
$q0 = COPY %sub2
RET_ReallyLR implicit $q0
...
---
name: AMinusBMinusA
body: |
bb.0:
liveins: $w0, $w1
; CHECK-LABEL: name: AMinusBMinusA
; CHECK: liveins: $w0, $w1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(s64) = COPY $x1
; CHECK-NEXT: $x0 = COPY %b(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%a:_(s64) = COPY $x0
%b:_(s64) = COPY $x1
%sub1:_(s64) = G_SUB %a, %b
%sub2:_(s64) = G_SUB %a, %sub1
$x0 = COPY %sub2
RET_ReallyLR implicit $x0
...
---
name: AMinusBMinusA_BV
body: |
bb.0:
liveins: $q0, $q1
; CHECK-LABEL: name: AMinusBMinusA_BV
; CHECK: liveins: $q0, $q1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %b:_(<4 x s32>) = COPY $q1
; CHECK-NEXT: $q0 = COPY %b(<4 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%a:_(<4 x s32>) = COPY $q0
%b:_(<4 x s32>) = COPY $q1
%sub1:_(<4 x s32>) = G_SUB %a, %b
%sub2:_(<4 x s32>) = G_SUB %a, %sub1
$q0 = COPY %sub2
RET_ReallyLR implicit $q0
...