[PATCH] D82217: [SVE] Remove calls to VectorType::getNumElements from WebASM
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 12:55:01 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5e2c736395cc: [SVE] Remove calls to VectorType::getNumElements from WebASM (authored by ctetreau).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82217/new/
https://reviews.llvm.org/D82217
Files:
llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
Index: llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
@@ -63,10 +63,11 @@
// approxmation.
if (Opd2Info != TTI::OK_UniformValue &&
Opd2Info != TTI::OK_UniformConstantValue)
- Cost = VTy->getNumElements() *
- (TargetTransformInfo::TCC_Basic +
- getArithmeticInstrCost(Opcode, VTy->getElementType(), CostKind) +
- TargetTransformInfo::TCC_Basic);
+ Cost =
+ cast<FixedVectorType>(VTy)->getNumElements() *
+ (TargetTransformInfo::TCC_Basic +
+ getArithmeticInstrCost(Opcode, VTy->getElementType(), CostKind) +
+ TargetTransformInfo::TCC_Basic);
break;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82217.272523.patch
Type: text/x-patch
Size: 915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200622/f1805579/attachment.bin>
More information about the llvm-commits
mailing list