]> granicus.if.org Git - clang/commitdiff
Revert r134946
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 12 Jul 2011 22:30:58 +0000 (22:30 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 12 Jul 2011 22:30:58 +0000 (22:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135004 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp
test/CodeGen/x86_64-arguments.c

index bc611176ce829a7f285bfe9aa3c21f5693d4be93..199ce251a10ba4b37da62eeb8d788f5c90a2975d 100644 (file)
@@ -1235,13 +1235,6 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase,
 
     const RecordDecl *RD = RT->getDecl();
 
-    // The only case a 256-bit wide vector could be used is when the struct
-    // contains a single 256-bit element. Since Lo and Hi logic isn't extended
-    // to work for sizes wider than 128, early check and fallback to memory.
-    RecordDecl::field_iterator FirstElt = RD->field_begin();
-    if (Size > 128 && getContext().getTypeSize(FirstElt->getType()) != 256)
-      return;
-
     // Assume variable sized types are passed in memory.
     if (RD->hasFlexibleArrayMember())
       return;
@@ -1277,7 +1270,7 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase,
 
     // Classify the fields one at a time, merging the results.
     unsigned idx = 0;
-    for (RecordDecl::field_iterator i = FirstElt, e = RD->field_end();
+    for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
            i != e; ++i, ++idx) {
       uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx);
       bool BitField = i->isBitField();
index 221c7d38a73d99e8aa00fe0fd6bf710c3fdd0e31..d256748b8f368847dd0fde99ddfa91d1ca065c92 100644 (file)
@@ -280,7 +280,7 @@ void f39() { f38(x38); f37(x37); }
 // The two next tests make sure that the struct below is passed
 // in the same way regardless of avx being used
 
-// CHECK: declare void @func40(%struct.t128* byval align 16)
+// TOBECHECKED: declare void @func40(%struct.t128* byval align 16)
 typedef float __m128 __attribute__ ((__vector_size__ (16)));
 typedef struct t128 {
   __m128 m;
@@ -292,7 +292,7 @@ void func41(two128 s) {
   func40(s);
 }
 
-// CHECK: declare void @func42(%struct.t128_2* byval align 16)
+// TOBECHECKED: declare void @func42(%struct.t128_2* byval align 16)
 typedef struct xxx {
   __m128 array[2];
 } Atwo128;