[llvm-commits] [dragonegg] r152399 - in /dragonegg/trunk/src/x86: Target.cpp x86_builtins
Duncan Sands
baldrick at free.fr
Fri Mar 9 01:35:56 PST 2012
Author: baldrick
Date: Fri Mar 9 03:35:56 2012
New Revision: 152399
URL: http://llvm.org/viewvc/llvm-project?rev=152399&view=rev
Log:
Add support for the 3dnow! intrinsics pswapdsf and pswapdsi. These were
showing up missing on a buildbot.
Modified:
dragonegg/trunk/src/x86/Target.cpp
dragonegg/trunk/src/x86/x86_builtins
Modified: dragonegg/trunk/src/x86/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/Target.cpp?rev=152399&r1=152398&r2=152399&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/Target.cpp (original)
+++ dragonegg/trunk/src/x86/Target.cpp Fri Mar 9 03:35:56 2012
@@ -888,6 +888,16 @@
// Need to sign extend since icmp returns a vector of i1.
Result = Builder.CreateSExt(Result, ResultType);
return true;
+ case pswapdsf:
+ case pswapdsi: {
+ Type *MMXTy = Type::getX86_MMXTy(Context);
+ Ops[0] = Builder.CreateBitCast(Ops[0], MMXTy);
+ Function *pswapd = Intrinsic::getDeclaration(TheModule,
+ Intrinsic::x86_3dnowa_pswapd);
+ Result = Builder.CreateCall(pswapd, Ops[0]);
+ Result = Builder.CreateBitCast(Result, ResultType);
+ return true;
+ }
}
llvm_unreachable("Forgot case for code?");
}
Modified: dragonegg/trunk/src/x86/x86_builtins
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/x86_builtins?rev=152399&r1=152398&r2=152399&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/x86_builtins (original)
+++ dragonegg/trunk/src/x86/x86_builtins Fri Mar 9 03:35:56 2012
@@ -656,8 +656,8 @@
DEFINE_BUILTIN(psubw),
DEFINE_BUILTIN(psubw128),
//DEFINE_BUILTIN(psubw256),
-//DEFINE_BUILTIN(pswapdsf),
-//DEFINE_BUILTIN(pswapdsi),
+DEFINE_BUILTIN(pswapdsf),
+DEFINE_BUILTIN(pswapdsi),
//DEFINE_BUILTIN(ptestc128),
//DEFINE_BUILTIN(ptestc256),
//DEFINE_BUILTIN(ptestnzc128),
More information about the llvm-commits
mailing list