summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-12-21 20:18:41 +0000
committerDuncan Sands <baldrick@free.fr>2007-12-21 20:18:41 +0000
commit85f26f28b90497356d39c072e6c83d2d7efe32ca (patch)
tree6205850aab5ca9c2d73ebb951d99086d740acadf /llvm/lib/Target/TargetData.cpp
parent93e2031187021ed2079a488929ebf0cfa750592d (diff)
downloadbcm5719-llvm-85f26f28b90497356d39c072e6c83d2d7efe32ca.tar.gz
bcm5719-llvm-85f26f28b90497356d39c072e6c83d2d7efe32ca.zip
Fix a brain fart by our beloved leader (the content
of this patch is the last line). llvm-svn: 45289
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
-rw-r--r--llvm/lib/Target/TargetData.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index 8c466543fac..04ee9864923 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/lib/Target/TargetData.cpp
@@ -268,15 +268,14 @@ unsigned TargetData::getAlignmentInfo(AlignTypeEnum AlignType,
return ABIInfo ? Alignments[i].ABIAlign : Alignments[i].PrefAlign;
// The best match so far depends on what we're looking for.
- if (AlignType == VECTOR_ALIGN) {
+ if (AlignType == VECTOR_ALIGN && Alignments[i].AlignType == VECTOR_ALIGN) {
// If this is a specification for a smaller vector type, we will fall back
// to it. This happens because <128 x double> can be implemented in terms
// of 64 <2 x double>.
- if (Alignments[i].AlignType == VECTOR_ALIGN &&
- Alignments[i].TypeBitWidth < BitWidth) {
+ if (Alignments[i].TypeBitWidth < BitWidth) {
// Verify that we pick the biggest of the fallbacks.
if (BestMatchIdx == -1 ||
- Alignments[BestMatchIdx].TypeBitWidth < BitWidth)
+ Alignments[BestMatchIdx].TypeBitWidth < Alignments[i].TypeBitWidth)
BestMatchIdx = i;
}
} else if (AlignType == INTEGER_ALIGN &&
OpenPOWER on IntegriCloud