[PATCH] D31024: Bugfix in BasicTTIImpl::getIntrinsicInstrCost()
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 01:53:50 PDT 2017
jonpa created this revision.
Fix for http://bugs.llvm.org/show_bug.cgi?id=32285
Originated in
https://reviews.llvm.org/D29540
https://reviews.llvm.org/D31024
Files:
include/llvm/CodeGen/BasicTTIImpl.h
Index: include/llvm/CodeGen/BasicTTIImpl.h
===================================================================
--- include/llvm/CodeGen/BasicTTIImpl.h
+++ include/llvm/CodeGen/BasicTTIImpl.h
@@ -742,7 +742,9 @@
// CostModel will pass a vector RetTy and VF is 1.
unsigned ScalarizationCost = UINT_MAX;
if (RetVF > 1 || VF > 1) {
- ScalarizationCost = getScalarizationOverhead(RetTy, true, false);
+ ScalarizationCost = 0;
+ if (!RetTy->isVoidTy())
+ ScalarizationCost += getScalarizationOverhead(RetTy, true, false);
ScalarizationCost += getOperandsScalarizationOverhead(Args, VF);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31024.91978.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/1e0ae887/attachment.bin>
More information about the llvm-commits
mailing list