Try to fix a test broken by one of my previous commits.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 17 Mar 2015 20:31:56 +0000 (20:31 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 17 Mar 2015 20:31:56 +0000 (20:31 +0000)
llvm-svn: 232536

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index 47263ff..b7d0ae4 100644 (file)
@@ -2638,6 +2638,9 @@ static Value *addFastMathFlag(Value *V) {
 /// the result needs to be inserted and/or extracted from vectors.
 static unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract,
                                          const TargetTransformInfo &TTI) {
+  if (Ty->isVoidTy())
+    return 0;
+
   assert(Ty->isVectorTy() && "Can only scalarize vectors");
   unsigned Cost = 0;