From: Eli Friedman Date: Sat, 2 Jul 2011 00:57:27 +0000 (+0000) Subject: Don't use x86_mmx where it isn't necessary. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14508ff0bffee0fdfe5d336946c6db0e709099c8;p=clang Don't use x86_mmx where it isn't necessary. 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 --- diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index f65fc185ba..8736d59f56 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -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; } diff --git a/test/CodeGen/x86_64-arguments.c b/test/CodeGen/x86_64-arguments.c index 75c4788f71..090e70d810 100644 --- a/test/CodeGen/x86_64-arguments.c +++ b/test/CodeGen/x86_64-arguments.c @@ -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; }