]> granicus.if.org Git - clang/commitdiff
Don't use x86_mmx where it isn't necessary.
authorEli Friedman <eli.friedman@gmail.com>
Sat, 2 Jul 2011 00:57:27 +0000 (00:57 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 2 Jul 2011 00:57:27 +0000 (00:57 +0000)
The start of some work on getting -mno-mmx working the way we want it to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134300 91177308-0d34-0410-b5e6-96231b3b80d8

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

index f65fc185ba48ba06444e0ca41163149236fedd21..8736d59f56e6e6a7fc9117af17987dfd489217ec 100644 (file)
@@ -1801,12 +1801,7 @@ ABIArgInfo X86_64ABIInfo::classifyArgumentType(QualType Ty, unsigned &neededInt,
     // order from %xmm0 to %xmm7.
   case SSE: {
     const llvm::Type *IRType = CGT.ConvertTypeRecursive(Ty);
-    if (Hi != NoClass || !UseX86_MMXType(IRType))
-      ResType = GetSSETypeAtOffset(IRType, 0, Ty, 0);
-    else
-      // This is an MMX type. Treat it as such.
-      ResType = llvm::Type::getX86_MMXTy(getVMContext());
-
+    ResType = GetSSETypeAtOffset(IRType, 0, Ty, 0);
     ++neededSSE;
     break;
   }
index 75c4788f7120f2962edc10df3960c124c2758ce1..090e70d8107df0811723cdb2ae1f3d2ac28b1d8c 100644 (file)
@@ -259,3 +259,6 @@ void f9122143()
   func(ss);
 }
 
+// CHECK: define double @f36(double %arg.coerce)
+typedef unsigned v2i32 __attribute((__vector_size__(8)));
+v2i32 f36(v2i32 arg) { return arg; }