[SVE] Remove bad call to VectorType::getNumElements() from ARM
authorChristopher Tetreault <ctetreau@quicinc.com>
Mon, 3 Aug 2020 22:16:16 +0000 (15:16 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Mon, 3 Aug 2020 22:41:14 +0000 (15:41 -0700)
Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D85152

llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp

index 9674a81..6876739 100644 (file)
@@ -166,7 +166,7 @@ ARMTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
       if (auto *CI = dyn_cast<ConstantInt>(XorMask)) {
         if (CI->getValue().trunc(16).isAllOnesValue()) {
           auto TrueVector = IC.Builder.CreateVectorSplat(
-              cast<VectorType>(II.getType())->getNumElements(),
+              cast<FixedVectorType>(II.getType())->getNumElements(),
               IC.Builder.getTrue());
           return BinaryOperator::Create(Instruction::Xor, ArgArg, TrueVector);
         }