[llvm] b5059b7 - [SVE] Remove bad call to VectorType::getNumElements() from ARM
Christopher Tetreault via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 15:41:32 PDT 2020
Author: Christopher Tetreault
Date: 2020-08-03T15:41:14-07:00
New Revision: b5059b7140232559ed123cb94d4e8f75ca9a44dc
URL: https://github.com/llvm/llvm-project/commit/b5059b7140232559ed123cb94d4e8f75ca9a44dc
DIFF: https://github.com/llvm/llvm-project/commit/b5059b7140232559ed123cb94d4e8f75ca9a44dc.diff
LOG: [SVE] Remove bad call to VectorType::getNumElements() from ARM
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D85152
Added:
Modified:
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
index 9674a813a52a..68767398191a 100644
--- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
@@ -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);
}
More information about the llvm-commits
mailing list