[PATCH] D146118: [X86]add assert to confirm not-null ptr in getArithmeticReductionCost
Wang, Xin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 22:36:48 PDT 2023
XinWang10 updated this revision to Diff 505701.
XinWang10 added a comment.
- rebase and update assert msg
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146118/new/
https://reviews.llvm.org/D146118
Files:
llvm/include/llvm/CodeGen/BasicTTIImpl.h
Index: llvm/include/llvm/CodeGen/BasicTTIImpl.h
===================================================================
--- llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -2334,6 +2334,7 @@
InstructionCost getArithmeticReductionCost(unsigned Opcode, VectorType *Ty,
std::optional<FastMathFlags> FMF,
TTI::TargetCostKind CostKind) {
+ assert(Ty && "Unknown reduction vector type");
if (TTI::requiresOrderedReduction(FMF))
return getOrderedReductionCost(Opcode, Ty, CostKind);
return getTreeReductionCost(Opcode, Ty, CostKind);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146118.505701.patch
Type: text/x-patch
Size: 679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230316/fbcc6852/attachment.bin>
More information about the llvm-commits
mailing list