[llvm-commits] [llvm-gcc-4.0] r43489 - /llvm-gcc-4.0/trunk/gcc/config/i386/llvm-i386.cpp
Dale Johannesen
dalej at apple.com
Mon Oct 29 18:20:07 PDT 2007
Author: johannes
Date: Mon Oct 29 20:20:06 2007
New Revision: 43489
URL: http://llvm.org/viewvc/llvm-project?rev=43489&view=rev
Log:
Add missing MMX PSUBQ. Add missing typecasts in PSLLQI and PSRLQI.
Modified:
llvm-gcc-4.0/trunk/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.0/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/config/i386/llvm-i386.cpp?rev=43489&r1=43488&r2=43489&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/config/i386/llvm-i386.cpp Mon Oct 29 20:20:06 2007
@@ -63,6 +63,7 @@
case IX86_BUILTIN_PSUBB:
case IX86_BUILTIN_PSUBW:
case IX86_BUILTIN_PSUBD:
+ case IX86_BUILTIN_PSUBQ:
case IX86_BUILTIN_PSUBB128:
case IX86_BUILTIN_PSUBW128:
case IX86_BUILTIN_PSUBD128:
@@ -112,6 +113,8 @@
case IX86_BUILTIN_PSLLQI: {
Function *psllq =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psll_q);
+ Ops[0] = Builder.CreateBitCast(Ops[0], MVT::getTypeForValueType(MVT::v2i32),
+ "tmp");
Ops[1] = BuildVector(Ops[1], UndefValue::get(Type::Int32Ty), NULL);
Result = Builder.CreateCall(psllq, Ops.begin(), Ops.begin()+2, "tmp");
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
@@ -163,6 +166,8 @@
case IX86_BUILTIN_PSRLQI: {
Function *psrlq =
Intrinsic::getDeclaration(TheModule, Intrinsic::x86_mmx_psrl_q);
+ Ops[0] = Builder.CreateBitCast(Ops[0], MVT::getTypeForValueType(MVT::v2i32),
+ "tmp");
Ops[1] = BuildVector(Ops[1], UndefValue::get(Type::Int32Ty), NULL);
Result = Builder.CreateCall(psrlq, Ops.begin(), Ops.begin()+2, "tmp");
Result = Builder.CreateBitCast(Result, ResultType, "tmp");
More information about the llvm-commits
mailing list