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
520 lines
17 KiB
YAML
520 lines
17 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
|
|
|
|
---
|
|
name: zext_trunc_nuw
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: $x1 = COPY [[COPY]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = nuw G_TRUNC %0
|
|
%3:_(s64) = G_ZEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: zext_trunc_nsw
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nsw
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = nsw G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[TRUNC]](s32)
|
|
; CHECK-NEXT: $x1 = COPY [[ZEXT]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = nsw G_TRUNC %0
|
|
%3:_(s64) = G_ZEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: zext_trunc
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[TRUNC]](s32)
|
|
; CHECK-NEXT: $x1 = COPY [[ZEXT]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = G_TRUNC %0
|
|
%3:_(s64) = G_ZEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: zext_trunc_nuw_vector
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw_vector
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK-NEXT: %trunc:_(<4 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC]](s16), [[TRUNC1]](s16)
|
|
; CHECK-NEXT: %zext:_(<4 x s32>) = G_ZEXT %trunc(<4 x s16>)
|
|
; CHECK-NEXT: $q0 = COPY %zext(<4 x s32>)
|
|
; CHECK-NEXT: RET_ReallyLR implicit $w0
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s32) = COPY $w1
|
|
%2:_(s32) = COPY $w2
|
|
%3:_(s32) = COPY $w3
|
|
%bv0:_(<4 x s32>) = G_BUILD_VECTOR %0:_(s32), %1:_(s32), %0:_(s32), %1:_(s32)
|
|
%trunc:_(<4 x s16>) = nuw G_TRUNC %bv0
|
|
%zext:_(<4 x s32>) = G_ZEXT %trunc
|
|
$q0 = COPY %zext(<4 x s32>)
|
|
RET_ReallyLR implicit $w0
|
|
...
|
|
---
|
|
name: sext_trunc_nsw
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nsw
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: $x1 = COPY [[COPY]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = nsw G_TRUNC %0
|
|
%3:_(s64) = G_SEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc_nuw
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nuw
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
|
|
; CHECK-NEXT: $x1 = COPY [[SEXT_INREG]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = nuw G_TRUNC %0
|
|
%3:_(s64) = G_SEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
|
|
; CHECK-NEXT: $x1 = COPY [[SEXT_INREG]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = G_TRUNC %0
|
|
%3:_(s64) = G_SEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc_nsw_types_wrong
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nsw_types_wrong
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = nsw G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: $w1 = COPY [[TRUNC]](s32)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s16) = nsw G_TRUNC %0
|
|
%3:_(s32) = G_SEXT %2
|
|
$w1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc_nsw_nuw
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nsw_nuw
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: $x1 = COPY [[COPY]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s32) = nsw nuw G_TRUNC %0
|
|
%3:_(s64) = G_SEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc_nsw_nuw_vector
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nsw_nuw_vector
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
|
|
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
|
|
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
|
|
; CHECK-NEXT: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[COPY3]](s32)
|
|
; CHECK-NEXT: %t:_(<4 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC2]](s16), [[TRUNC3]](s16)
|
|
; CHECK-NEXT: %s:_(<4 x s32>) = G_SEXT %t(<4 x s16>)
|
|
; CHECK-NEXT: $q0 = COPY %s(<4 x s32>)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s32) = COPY $w1
|
|
%2:_(s32) = COPY $w2
|
|
%3:_(s32) = COPY $w3
|
|
%bv0:_(<4 x s32>) = G_BUILD_VECTOR %0:_(s32), %1:_(s32), %2:_(s32), %3:_(s32)
|
|
%t:_(<4 x s16>) = nsw nuw G_TRUNC %bv0
|
|
%s:_(<4 x s32>) = G_SEXT %t
|
|
$q0 = COPY %s
|
|
...
|
|
---
|
|
name: zext_trunc_vector
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_vector
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
|
|
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
|
|
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
|
|
; CHECK-NEXT: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[COPY3]](s32)
|
|
; CHECK-NEXT: %t:_(<4 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC2]](s16), [[TRUNC3]](s16)
|
|
; CHECK-NEXT: %z:_(<4 x s32>) = G_ZEXT %t(<4 x s16>)
|
|
; CHECK-NEXT: $q0 = COPY %z(<4 x s32>)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s32) = COPY $w1
|
|
%2:_(s32) = COPY $w2
|
|
%3:_(s32) = COPY $w3
|
|
%bv0:_(<4 x s32>) = G_BUILD_VECTOR %0:_(s32), %1:_(s32), %2:_(s32), %3:_(s32)
|
|
%t:_(<4 x s16>) = G_TRUNC %bv0
|
|
%z:_(<4 x s32>) = G_ZEXT %t
|
|
$q0 = COPY %z
|
|
...
|
|
---
|
|
name: zext_trunc_nsw_vector
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nsw_vector
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
|
|
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
|
|
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
|
|
; CHECK-NEXT: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[COPY3]](s32)
|
|
; CHECK-NEXT: %t:_(<4 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC2]](s16), [[TRUNC3]](s16)
|
|
; CHECK-NEXT: %z:_(<4 x s32>) = G_ZEXT %t(<4 x s16>)
|
|
; CHECK-NEXT: $q0 = COPY %z(<4 x s32>)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s32) = COPY $w1
|
|
%2:_(s32) = COPY $w2
|
|
%3:_(s32) = COPY $w3
|
|
%bv0:_(<4 x s32>) = G_BUILD_VECTOR %0:_(s32), %1:_(s32), %2:_(s32), %3:_(s32)
|
|
%t:_(<4 x s16>) = nsw G_TRUNC %bv0
|
|
%z:_(<4 x s32>) = G_ZEXT %t
|
|
$q0 = COPY %z
|
|
...
|
|
---
|
|
name: zext_trunc_nuw_vector2
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw_vector2
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
|
|
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
|
|
; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK-NEXT: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
|
|
; CHECK-NEXT: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[COPY3]](s32)
|
|
; CHECK-NEXT: %t:_(<4 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16), [[TRUNC2]](s16), [[TRUNC3]](s16)
|
|
; CHECK-NEXT: %z:_(<4 x s32>) = G_ZEXT %t(<4 x s16>)
|
|
; CHECK-NEXT: $q0 = COPY %z(<4 x s32>)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s32) = COPY $w1
|
|
%2:_(s32) = COPY $w2
|
|
%3:_(s32) = COPY $w3
|
|
%bv0:_(<4 x s32>) = G_BUILD_VECTOR %0:_(s32), %1:_(s32), %2:_(s32), %3:_(s32)
|
|
%t:_(<4 x s16>) = nuw G_TRUNC %bv0
|
|
%z:_(<4 x s32>) = G_ZEXT %t
|
|
$q0 = COPY %z
|
|
...
|
|
---
|
|
name: zext_trunc_nuw_vector_wrong_type
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw_vector_wrong_type
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s64)
|
|
; CHECK-NEXT: %t:_(<2 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16)
|
|
; CHECK-NEXT: %z:_(<2 x s32>) = G_ZEXT %t(<2 x s16>)
|
|
; CHECK-NEXT: $d0 = COPY %z(<2 x s32>)
|
|
%0:_(s64) = COPY $x0
|
|
%1:_(s64) = COPY $x1
|
|
%bv0:_(<2 x s64>) = G_BUILD_VECTOR %0:_(s64), %1:_(s64)
|
|
%t:_(<2 x s16>) = nuw G_TRUNC %bv0
|
|
%z:_(<2 x s32>) = G_ZEXT %t
|
|
$d0 = COPY %z
|
|
...
|
|
---
|
|
name: zext_trunc_nuw_scalable_vector
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw_scalable_vector
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: %sv0:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR [[COPY]](s64)
|
|
; CHECK-NEXT: $z0 = COPY %sv0(<vscale x 2 x s64>)
|
|
%0:_(s64) = COPY $x0
|
|
%1:_(s64) = COPY $x1
|
|
%sv0:_(<vscale x 2 x s64>) = G_SPLAT_VECTOR %0:_(s64)
|
|
%t:_(<vscale x 2 x s32>) = nuw G_TRUNC %sv0
|
|
%z:_(<vscale x 2 x s64>) = G_ZEXT %t
|
|
$z0 = COPY %z
|
|
...
|
|
---
|
|
name: zext_trunc_nuw_to_zext
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw_to_zext
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: %2:_(s64) = nneg G_ZEXT [[COPY]](s32)
|
|
; CHECK-NEXT: $x1 = COPY %2(s64)
|
|
%0:_(s32) = COPY $w0
|
|
%2:_(s16) = nuw G_TRUNC %0
|
|
%3:_(s64) = G_ZEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: zext_trunc_nuw_to_trunc
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: zext_trunc_nuw_to_trunc
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = nuw G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: $w1 = COPY [[TRUNC]](s32)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s16) = nuw G_TRUNC %0
|
|
%3:_(s32) = G_ZEXT %2
|
|
$w1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc_nsw_to_sext
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nsw_to_sext
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s32)
|
|
; CHECK-NEXT: $x1 = COPY [[SEXT]](s64)
|
|
%0:_(s32) = COPY $w0
|
|
%2:_(s16) = nsw G_TRUNC %0
|
|
%3:_(s64) = G_SEXT %2
|
|
$x1 = COPY %3
|
|
...
|
|
---
|
|
name: sext_trunc_nsw_to_trunc
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
; CHECK-LABEL: name: sext_trunc_nsw_to_trunc
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = nsw G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: $w1 = COPY [[TRUNC]](s32)
|
|
%0:_(s64) = COPY $x0
|
|
%2:_(s16) = nsw G_TRUNC %0
|
|
%3:_(s32) = G_SEXT %2
|
|
$w1 = COPY %3
|
|
...
|
|
---
|
|
name: trunc_sext_i32_i16
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0
|
|
|
|
; CHECK-LABEL: name: trunc_sext_i32_i16
|
|
; CHECK: liveins: $w0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY]], 16
|
|
; CHECK-NEXT: $w0 = COPY [[SEXT_INREG]](s32)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s16) = G_TRUNC %0
|
|
%2:_(s32) = G_SEXT %1
|
|
$w0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_i32_i1
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0
|
|
|
|
; CHECK-LABEL: name: trunc_sext_i32_i1
|
|
; CHECK: liveins: $w0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s1)
|
|
; CHECK-NEXT: $w0 = COPY [[SEXT]](s32)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s1) = G_TRUNC %0
|
|
%2:_(s32) = G_SEXT %1
|
|
$w0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_i32_i2
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0
|
|
|
|
; CHECK-LABEL: name: trunc_sext_i32_i2
|
|
; CHECK: liveins: $w0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s2) = G_TRUNC [[COPY]](s32)
|
|
; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s2)
|
|
; CHECK-NEXT: $w0 = COPY [[SEXT]](s32)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s2) = G_TRUNC %0
|
|
%2:_(s32) = G_SEXT %1
|
|
$w0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_i32_i8
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0
|
|
|
|
; CHECK-LABEL: name: trunc_sext_i32_i8
|
|
; CHECK: liveins: $w0
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY]], 8
|
|
; CHECK-NEXT: $w0 = COPY [[SEXT_INREG]](s32)
|
|
%0:_(s32) = COPY $w0
|
|
%1:_(s8) = G_TRUNC %0
|
|
%2:_(s32) = G_SEXT %1
|
|
$w0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_i64_i32
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
|
|
; CHECK-LABEL: name: trunc_sext_i64_i32
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
|
|
; CHECK-NEXT: $x0 = COPY [[SEXT_INREG]](s64)
|
|
%0:_(s64) = COPY $x0
|
|
%1:_(s32) = G_TRUNC %0
|
|
%2:_(s64) = G_SEXT %1
|
|
$x0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_v2i32_v2i16
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
|
|
; CHECK-LABEL: name: trunc_sext_v2i32_v2i16
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $x0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<2 x s32>) = G_SEXT_INREG [[COPY]], 16
|
|
; CHECK-NEXT: $x0 = COPY [[SEXT_INREG]](<2 x s32>)
|
|
%0:_(<2 x s32>) = COPY $x0
|
|
%1:_(<2 x s16>) = G_TRUNC %0
|
|
%2:_(<2 x s32>) = G_SEXT %1
|
|
$x0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_v4i16_v4i8
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
|
|
; CHECK-LABEL: name: trunc_sext_v4i16_v4i8
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $x0
|
|
; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<4 x s16>) = G_SEXT_INREG [[COPY]], 8
|
|
; CHECK-NEXT: $x0 = COPY [[SEXT_INREG]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $x0
|
|
%1:_(<4 x s8>) = G_TRUNC %0
|
|
%2:_(<4 x s16>) = G_SEXT %1
|
|
$x0 = COPY %2
|
|
...
|
|
---
|
|
name: trunc_sext_mismatching_types
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0, $w1
|
|
|
|
; CHECK-LABEL: name: trunc_sext_mismatching_types
|
|
; CHECK: liveins: $w0, $w1
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s64)
|
|
; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s32) = G_SEXT [[TRUNC]](s16)
|
|
; CHECK-NEXT: $w0 = COPY [[SEXT]](s32)
|
|
%0:_(s64) = COPY $x0
|
|
%1:_(s16) = G_TRUNC %0
|
|
%2:_(s32) = G_SEXT %1
|
|
$w0 = COPY %2
|
|
...
|