|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2 | 2 | ; RUN: llc < %s --mattr=+complxnum,+neon,+fullfp16 -o - | FileCheck %s
|
3 | 3 | ; RUN: llc < %s --mattr=+complxnum,+neon,+fullfp16,+sve -o - | FileCheck %s
|
| 4 | +; RUN: llc < %s --mattr=+complxnum,+neon,+fullfp16,+sve2 -o - | FileCheck %s |
4 | 5 |
|
5 | 6 | target triple = "aarch64"
|
6 | 7 |
|
@@ -158,6 +159,32 @@ entry:
|
158 | 159 | ret <16 x half> %interleaved.vec
|
159 | 160 | }
|
160 | 161 |
|
| 162 | + |
| 163 | +; Expected not to transform as it is integer |
| 164 | +define <16 x i16> @complex_add_v16i16(<16 x i16> %a, <16 x i16> %b) { |
| 165 | +; CHECK-LABEL: complex_add_v16i16: |
| 166 | +; CHECK: // %bb.0: // %entry |
| 167 | +; CHECK-NEXT: uzp1 v4.8h, v2.8h, v3.8h |
| 168 | +; CHECK-NEXT: uzp1 v5.8h, v0.8h, v1.8h |
| 169 | +; CHECK-NEXT: uzp2 v0.8h, v0.8h, v1.8h |
| 170 | +; CHECK-NEXT: uzp2 v1.8h, v2.8h, v3.8h |
| 171 | +; CHECK-NEXT: sub v2.8h, v4.8h, v0.8h |
| 172 | +; CHECK-NEXT: add v1.8h, v1.8h, v5.8h |
| 173 | +; CHECK-NEXT: zip1 v0.8h, v2.8h, v1.8h |
| 174 | +; CHECK-NEXT: zip2 v1.8h, v2.8h, v1.8h |
| 175 | +; CHECK-NEXT: ret |
| 176 | +entry: |
| 177 | + %a.real = shufflevector <16 x i16> %a, <16 x i16> zeroinitializer, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14> |
| 178 | + %a.imag = shufflevector <16 x i16> %a, <16 x i16> zeroinitializer, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15> |
| 179 | + %b.real = shufflevector <16 x i16> %b, <16 x i16> zeroinitializer, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14> |
| 180 | + %b.imag = shufflevector <16 x i16> %b, <16 x i16> zeroinitializer, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15> |
| 181 | + %0 = sub <8 x i16> %b.real, %a.imag |
| 182 | + %1 = add <8 x i16> %b.imag, %a.real |
| 183 | + %interleaved.vec = shufflevector <8 x i16> %0, <8 x i16> %1, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15> |
| 184 | + ret <16 x i16> %interleaved.vec |
| 185 | +} |
| 186 | + |
| 187 | + |
161 | 188 | declare { <2 x half>, <2 x half> } @llvm.experimental.vector.deinterleave2.v4f16(<4 x half>)
|
162 | 189 | declare <4 x half> @llvm.experimental.vector.interleave2.v4f16(<2 x half>, <2 x half>)
|
163 | 190 |
|
|
0 commit comments