Author: baldrick
Date: Fri Dec 21 14:18:41 2007
New Revision: 45289

URL: http://llvm.org/viewvc/llvm-project?rev=45289&view=rev
Log:
Fix a brain fart by our beloved leader (the content
of this patch is the last line).

Modified:
    llvm/trunk/lib/Target/TargetData.cpp

Modified: llvm/trunk/lib/Target/TargetData.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=45289&r1=45288&r2=45289&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetData.cpp (original)
+++ llvm/trunk/lib/Target/TargetData.cpp Fri Dec 21 14:18:41 2007
@@ -268,15 +268,14 @@
       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 && 


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to