File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
test/Transforms/VectorCombine/AArch64 Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1333,6 +1333,11 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
13331333 TargetLowering::TypeSplitVector;
13341334 if ((SplitSrc || SplitDst) && SrcVTy->getElementCount ().isVector () &&
13351335 DstVTy->getElementCount ().isVector ()) {
1336+ auto SrcEltCnt = SrcVTy->getElementCount ();
1337+ auto DstEltCnt = DstVTy->getElementCount ();
1338+ if (!SrcEltCnt.isKnownEven () || !DstEltCnt.isKnownEven ()) {
1339+ return InstructionCost::getInvalid ();
1340+ }
13361341 Type *SplitDstTy = VectorType::getHalfElementsVectorType (DstVTy);
13371342 Type *SplitSrcTy = VectorType::getHalfElementsVectorType (SrcVTy);
13381343 const T *TTI = thisT ();
Original file line number Diff line number Diff line change 1+ ; RUN: opt -mtriple=aarch64-unknown-linux-gnu -passes=vector-combine %s -S -o - | FileCheck %s
2+
3+ target triple = "aarch64-unknown-linux-gnu"
4+
5+ define <vscale x 4 x i16 > @interleave2_same_const_splat_nxv4i16 () {
6+ ;CHECK-LABEL: @interleave2_same_const_splat_nxv4i16(
7+ ;CHECK: call <vscale x 4 x i16> @llvm.vector.interleave2
8+ ;CHECK: ret <vscale x 4 x i16> %retval
9+ %retval = call <vscale x 4 x i16 > @llvm.vector.interleave2.nxv4i16 (<vscale x 2 x i16 > splat(i16 3 ), <vscale x 2 x i16 > splat(i16 3 ))
10+ ret <vscale x 4 x i16 > %retval
11+ }
You can’t perform that action at this time.
0 commit comments