1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=1 %s -o - | FileCheck %s
8 tracksRegLiveness: true
15 ; CHECK-LABEL: name: add_B
17 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
18 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (<16 x s8>))
19 ; CHECK: [[ADDVv16i8v:%[0-9]+]]:fpr8 = ADDVv16i8v [[LDRQui]]
20 ; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:fpr32 = SUBREG_TO_REG 0, [[ADDVv16i8v]], %subreg.bsub
21 ; CHECK: [[COPY1:%[0-9]+]]:gpr32all = COPY [[SUBREG_TO_REG]]
22 ; CHECK: $w0 = COPY [[COPY1]]
23 ; CHECK: RET_ReallyLR implicit $w0
25 %1:fpr(<16 x s8>) = G_LOAD %0(p0) :: (load (<16 x s8>))
26 %2:fpr(s8) = G_VECREDUCE_ADD %1(<16 x s8>)
27 %4:gpr(s8) = COPY %2(s8)
28 %3:gpr(s32) = G_ANYEXT %4(s8)
30 RET_ReallyLR implicit $w0
38 tracksRegLiveness: true
45 ; CHECK-LABEL: name: add_H
47 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
48 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (<8 x s16>))
49 ; CHECK: [[ADDVv8i16v:%[0-9]+]]:fpr16 = ADDVv8i16v [[LDRQui]]
50 ; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:fpr32 = SUBREG_TO_REG 0, [[ADDVv8i16v]], %subreg.hsub
51 ; CHECK: [[COPY1:%[0-9]+]]:gpr32all = COPY [[SUBREG_TO_REG]]
52 ; CHECK: $w0 = COPY [[COPY1]]
53 ; CHECK: RET_ReallyLR implicit $w0
55 %1:fpr(<8 x s16>) = G_LOAD %0(p0) :: (load (<8 x s16>))
56 %2:fpr(s16) = G_VECREDUCE_ADD %1(<8 x s16>)
57 %4:gpr(s16) = COPY %2(s16)
58 %3:gpr(s32) = G_ANYEXT %4(s16)
60 RET_ReallyLR implicit $w0
68 tracksRegLiveness: true
75 ; CHECK-LABEL: name: add_S
77 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
78 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (<4 x s32>))
79 ; CHECK: [[ADDVv4i32v:%[0-9]+]]:fpr32 = ADDVv4i32v [[LDRQui]]
80 ; CHECK: $w0 = COPY [[ADDVv4i32v]]
81 ; CHECK: RET_ReallyLR implicit $w0
83 %1:fpr(<4 x s32>) = G_LOAD %0(p0) :: (load (<4 x s32>))
84 %2:fpr(s32) = G_VECREDUCE_ADD %1(<4 x s32>)
86 RET_ReallyLR implicit $w0
94 tracksRegLiveness: true
101 ; CHECK-LABEL: name: add_S_v2i32
102 ; CHECK: liveins: $x0
103 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
104 ; CHECK: [[LDRDui:%[0-9]+]]:fpr64 = LDRDui [[COPY]], 0 :: (load (<2 x s32>))
105 ; CHECK: [[ADDPv2i32_:%[0-9]+]]:fpr64 = ADDPv2i32 [[LDRDui]], [[LDRDui]]
106 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[ADDPv2i32_]].ssub
107 ; CHECK: $w0 = COPY [[COPY1]]
108 ; CHECK: RET_ReallyLR implicit $w0
109 %0:gpr(p0) = COPY $x0
110 %1:fpr(<2 x s32>) = G_LOAD %0(p0) :: (load (<2 x s32>))
111 %2:fpr(s32) = G_VECREDUCE_ADD %1(<2 x s32>)
113 RET_ReallyLR implicit $w0
120 regBankSelected: true
121 tracksRegLiveness: true
128 ; CHECK-LABEL: name: add_D
129 ; CHECK: liveins: $x0
130 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
131 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (<2 x s64>))
132 ; CHECK: [[ADDPv2i64p:%[0-9]+]]:fpr64 = ADDPv2i64p [[LDRQui]]
133 ; CHECK: $x0 = COPY [[ADDPv2i64p]]
134 ; CHECK: RET_ReallyLR implicit $x0
135 %0:gpr(p0) = COPY $x0
136 %1:fpr(<2 x s64>) = G_LOAD %0(p0) :: (load (<2 x s64>))
137 %2:fpr(s64) = G_VECREDUCE_ADD %1(<2 x s64>)
139 RET_ReallyLR implicit $x0