summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2012-11-12 19:41:38 +0000
committerHal Finkel <hfinkel@anl.gov>2012-11-12 19:41:38 +0000
commitf8326b605245e10438ceaa8da23109e3fa077482 (patch)
treec6c941eec0b6d4fa39ab50d03a7fa185154417b9 /llvm/lib/Transforms
parenta7714a0ff986950eb42bd2417486d58ab4620d78 (diff)
downloadbcm5719-llvm-f8326b605245e10438ceaa8da23109e3fa077482.tar.gz
bcm5719-llvm-f8326b605245e10438ceaa8da23109e3fa077482.zip
BBVectorize: Check the types of compare instructions
The pass would previously assert when trying to compute the cost of compare instructions with illegal vector types (like struct pointers). llvm-svn: 167743
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/BBVectorize.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/BBVectorize.cpp b/llvm/lib/Transforms/Vectorize/BBVectorize.cpp
index 93cd27e02d9..407cd7b02d4 100644
--- a/llvm/lib/Transforms/Vectorize/BBVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/BBVectorize.cpp
@@ -485,6 +485,8 @@ namespace {
T2 = SI->getCondition()->getType();
} else if (ShuffleVectorInst *SI = dyn_cast<ShuffleVectorInst>(I)) {
T2 = SI->getOperand(0)->getType();
+ } else if (CmpInst *CI = dyn_cast<CmpInst>(I)) {
+ T2 = CI->getOperand(0)->getType();
}
}
OpenPOWER on IntegriCloud