summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-04-22 21:16:17 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-04-22 21:16:17 +0000
commit940d19a09c40dd26656102da2115718794ddcf07 (patch)
tree4a1c1bb9cd04f899fdc8ba42e6b8fe30b47c91ce /llvm/lib/CodeGen/TargetLoweringBase.cpp
parent5fa60985cfa91a370ded6e6b4c6cd85501da6e09 (diff)
downloadbcm5719-llvm-940d19a09c40dd26656102da2115718794ddcf07.tar.gz
bcm5719-llvm-940d19a09c40dd26656102da2115718794ddcf07.zip
TLI: Only iterate over integer vector types
Instead of iterating over all vectors and skipping integers. llvm-svn: 267220
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 67e35a73b87..aa4e03548b9 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1381,13 +1381,12 @@ void TargetLoweringBase::computeRegisterProperties(
case TypePromoteInteger: {
// Try to promote the elements of integer vectors. If no legal
// promotion was found, fall through to the widen-vector method.
- for (unsigned nVT = i + 1; nVT <= MVT::LAST_VECTOR_VALUETYPE; ++nVT) {
+ for (unsigned nVT = i + 1; nVT <= MVT::LAST_INTEGER_VECTOR_VALUETYPE; ++nVT) {
MVT SVT = (MVT::SimpleValueType) nVT;
// Promote vectors of integers to vectors with the same number
// of elements, with a wider element type.
- if (SVT.getVectorElementType().getSizeInBits() > EltVT.getSizeInBits()
- && SVT.getVectorNumElements() == NElts && isTypeLegal(SVT)
- && SVT.getScalarType().isInteger()) {
+ if (SVT.getVectorElementType().getSizeInBits() > EltVT.getSizeInBits() &&
+ SVT.getVectorNumElements() == NElts && isTypeLegal(SVT)) {
TransformToType[i] = SVT;
RegisterTypeForVT[i] = SVT;
NumRegistersForVT[i] = 1;
OpenPOWER on IntegriCloud