[PATCH] D22126: Fix calculation of scalarization overhead in BasicTTIImpl::getCmpSelInstrCost

Jordy Potman via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 02:15:05 PDT 2016

jordy.potman.lists created this revision.
jordy.potman.lists added a reviewer: mkuper.
jordy.potman.lists added a subscriber: llvm-commits.

The arguments to the getScalarizationOverhead call in BasicTTIImpl::getCmpSelInstrCost are inconsistent with the comment above it. The comment seems to be correct so change the arguments to match the comment.




Index: include/llvm/CodeGen/BasicTTIImpl.h
--- include/llvm/CodeGen/BasicTTIImpl.h
+++ include/llvm/CodeGen/BasicTTIImpl.h
@@ -498,7 +498,7 @@
       // Return the cost of multiple scalar invocation plus the cost of
       // inserting and extracting the values.
-      return getScalarizationOverhead(ValTy, true, false) + Num * Cost;
+      return getScalarizationOverhead(ValTy, true, true) + Num * Cost;
     // Unknown scalar opcode.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22126.63186.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160708/983fe435/attachment.bin>

More information about the llvm-commits mailing list