151 lines
6.5 KiB
YAML
151 lines
6.5 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=aarch64-linux-gnu -O0 -run-pass=legalizer %s -o - -global-isel-abort=1 | FileCheck %s
|
|
|
|
---
|
|
name: test_eve_1
|
|
body: |
|
|
bb.0:
|
|
liveins: $q0
|
|
; CHECK-LABEL: name: test_eve_1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[C]](s32)
|
|
; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s64>), [[SEXT]](s64)
|
|
; CHECK: $x0 = COPY [[EVEC]](s64)
|
|
; CHECK: RET_ReallyLR
|
|
%0:_(<2 x s64>) = COPY $q0
|
|
%1:_(s32) = G_CONSTANT i32 1
|
|
%2:_(s64) = G_EXTRACT_VECTOR_ELT %0(<2 x s64>), %1(s32)
|
|
$x0 = COPY %2(s64)
|
|
RET_ReallyLR
|
|
...
|
|
---
|
|
name: test_eve_v2s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $q0, $q1, $x0
|
|
; CHECK-LABEL: name: test_eve_v2s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $q1
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(eq), [[COPY]](<2 x s64>), [[COPY1]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(<2 x s64>) = COPY [[ICMP]](<2 x s64>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
|
|
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
|
|
; CHECK: [[SHL:%[0-9]+]]:_(<2 x s64>) = G_SHL [[COPY3]], [[BUILD_VECTOR]](<2 x s64>)
|
|
; CHECK: [[ASHR:%[0-9]+]]:_(<2 x s64>) = G_ASHR [[SHL]], [[BUILD_VECTOR]](<2 x s64>)
|
|
; CHECK: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[ASHR]](<2 x s64>), [[COPY2]](s64)
|
|
; CHECK: [[COPY4:%[0-9]+]]:_(s64) = COPY [[EVEC]](s64)
|
|
; CHECK: $x0 = COPY [[COPY4]](s64)
|
|
; CHECK: RET_ReallyLR
|
|
%0:_(<2 x s64>) = COPY $q0
|
|
%1:_(<2 x s64>) = COPY $q1
|
|
%2:_(s64) = COPY $x0
|
|
%3:_(<2 x s1>) = G_ICMP intpred(eq), %0(<2 x s64>), %1
|
|
%4:_(s1) = G_EXTRACT_VECTOR_ELT %3:_(<2 x s1>), %2:_(s64)
|
|
%5:_(s64) = G_ANYEXT %4(s1)
|
|
$x0 = COPY %5(s64)
|
|
RET_ReallyLR
|
|
...
|
|
---
|
|
name: test_eve_v4s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $q0, $q1, $x0
|
|
; CHECK-LABEL: name: test_eve_v4s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $q1
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(<4 x s32>) = G_ICMP intpred(eq), [[COPY]](<4 x s32>), [[COPY1]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(<4 x s32>) = COPY [[ICMP]](<4 x s32>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
|
|
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
|
|
; CHECK: [[SHL:%[0-9]+]]:_(<4 x s32>) = G_SHL [[COPY3]], [[BUILD_VECTOR]](<4 x s32>)
|
|
; CHECK: [[ASHR:%[0-9]+]]:_(<4 x s32>) = G_ASHR [[SHL]], [[BUILD_VECTOR]](<4 x s32>)
|
|
; CHECK: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[ASHR]](<4 x s32>), [[COPY2]](s64)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[EVEC]](s32)
|
|
; CHECK: $x0 = COPY [[ANYEXT]](s64)
|
|
; CHECK: RET_ReallyLR
|
|
%0:_(<4 x s32>) = COPY $q0
|
|
%1:_(<4 x s32>) = COPY $q1
|
|
%2:_(s64) = COPY $x0
|
|
%3:_(<4 x s1>) = G_ICMP intpred(eq), %0(<4 x s32>), %1
|
|
%4:_(s1) = G_EXTRACT_VECTOR_ELT %3:_(<4 x s1>), %2:_(s64)
|
|
%5:_(s64) = G_ANYEXT %4(s1)
|
|
$x0 = COPY %5(s64)
|
|
RET_ReallyLR
|
|
...
|
|
---
|
|
name: test_eve_v8s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $q0, $q1, $x0
|
|
; CHECK-LABEL: name: test_eve_v8s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<8 x s16>) = COPY $q0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<8 x s16>) = COPY $q1
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(<8 x s16>) = G_ICMP intpred(eq), [[COPY]](<8 x s16>), [[COPY1]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(<8 x s16>) = COPY [[ICMP]](<8 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 15
|
|
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s16>) = G_BUILD_VECTOR [[C]](s16), [[C]](s16), [[C]](s16), [[C]](s16), [[C]](s16), [[C]](s16), [[C]](s16), [[C]](s16)
|
|
; CHECK: [[SHL:%[0-9]+]]:_(<8 x s16>) = G_SHL [[COPY3]], [[BUILD_VECTOR]](<8 x s16>)
|
|
; CHECK: [[ASHR:%[0-9]+]]:_(<8 x s16>) = G_ASHR [[SHL]], [[BUILD_VECTOR]](<8 x s16>)
|
|
; CHECK: [[EVEC:%[0-9]+]]:_(s16) = G_EXTRACT_VECTOR_ELT [[ASHR]](<8 x s16>), [[COPY2]](s64)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[EVEC]](s16)
|
|
; CHECK: $x0 = COPY [[ANYEXT]](s64)
|
|
; CHECK: RET_ReallyLR
|
|
%0:_(<8 x s16>) = COPY $q0
|
|
%1:_(<8 x s16>) = COPY $q1
|
|
%2:_(s64) = COPY $x0
|
|
%3:_(<8 x s1>) = G_ICMP intpred(eq), %0(<8 x s16>), %1
|
|
%4:_(s1) = G_EXTRACT_VECTOR_ELT %3:_(<8 x s1>), %2:_(s64)
|
|
%5:_(s64) = G_ANYEXT %4(s1)
|
|
$x0 = COPY %5(s64)
|
|
RET_ReallyLR
|
|
...
|
|
---
|
|
name: test_eve_v16s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $q0, $q1, $x0
|
|
; CHECK-LABEL: name: test_eve_v16s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<16 x s8>) = COPY $q0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<16 x s8>) = COPY $q1
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(<16 x s8>) = G_ICMP intpred(eq), [[COPY]](<16 x s8>), [[COPY1]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(<16 x s8>) = COPY [[ICMP]](<16 x s8>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 7
|
|
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8), [[C]](s8)
|
|
; CHECK: [[SHL:%[0-9]+]]:_(<16 x s8>) = G_SHL [[COPY3]], [[BUILD_VECTOR]](<16 x s8>)
|
|
; CHECK: [[ASHR:%[0-9]+]]:_(<16 x s8>) = G_ASHR [[SHL]], [[BUILD_VECTOR]](<16 x s8>)
|
|
; CHECK: [[EVEC:%[0-9]+]]:_(s8) = G_EXTRACT_VECTOR_ELT [[ASHR]](<16 x s8>), [[COPY2]](s64)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[EVEC]](s8)
|
|
; CHECK: $x0 = COPY [[ANYEXT]](s64)
|
|
; CHECK: RET_ReallyLR
|
|
%0:_(<16 x s8>) = COPY $q0
|
|
%1:_(<16 x s8>) = COPY $q1
|
|
%2:_(s64) = COPY $x0
|
|
%3:_(<16 x s1>) = G_ICMP intpred(eq), %0(<16 x s8>), %1
|
|
%4:_(s1) = G_EXTRACT_VECTOR_ELT %3:_(<16 x s1>), %2:_(s64)
|
|
%5:_(s64) = G_ANYEXT %4(s1)
|
|
$x0 = COPY %5(s64)
|
|
RET_ReallyLR
|
|
...
|
|
---
|
|
name: test_eve_v2p0
|
|
body: |
|
|
bb.0:
|
|
liveins: $q0, $q1, $x0
|
|
; CHECK-LABEL: name: test_eve_v2p0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x p0>) = COPY $q0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x0
|
|
; CHECK: [[EVEC:%[0-9]+]]:_(p0) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x p0>), [[COPY1]](s64)
|
|
; CHECK: $x0 = COPY [[EVEC]](p0)
|
|
; CHECK: RET_ReallyLR
|
|
%0:_(<2 x p0>) = COPY $q0
|
|
%2:_(s64) = COPY $x0
|
|
%3:_(p0) = G_EXTRACT_VECTOR_ELT %0:_(<2 x p0>), %2:_(s64)
|
|
$x0 = COPY %3(p0)
|
|
RET_ReallyLR
|
|
...
|