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.