aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-15 21:36:44 +0000
committerChris Lattner <sabre@nondot.org>2004-06-15 21:36:44 +0000
commitdc5724478e4b5e7de8af822518040348d695f57f (patch)
tree45fd5a512a7a740fc561f23992ada785e67e7499 /lib
parent5e9a7ca75a4c6c091f0b2aa7139bb17e7094ee87 (diff)
downloadexternal_llvm-dc5724478e4b5e7de8af822518040348d695f57f.zip
external_llvm-dc5724478e4b5e7de8af822518040348d695f57f.tar.gz
external_llvm-dc5724478e4b5e7de8af822518040348d695f57f.tar.bz2
Add basic support for the isunordered intrinsic. The isnan stuff still needs to go
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/InstSelectSimple.cpp9
-rw-r--r--lib/Target/X86/X86ISelSimple.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index 8745090..984257c 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -1664,6 +1664,7 @@ void ISel::LowerUnknownIntrinsicFunctionCalls(Function &F) {
case Intrinsic::memcpy:
case Intrinsic::memset:
case Intrinsic::isnan:
+ case Intrinsic::isunordered:
case Intrinsic::readport:
case Intrinsic::writeport:
// We directly implement these intrinsics
@@ -1742,6 +1743,14 @@ void ISel::visitIntrinsicCall(Intrinsic::ID ID, CallInst &CI) {
BuildMI(BB, X86::SETPr, 0, TmpReg2);
return;
+ case Intrinsic::isunordered:
+ TmpReg1 = getReg(CI.getOperand(1));
+ TmpReg2 = getReg(CI.getOperand(2));
+ emitUCOMr(BB, BB->end(), TmpReg2, TmpReg1);
+ TmpReg2 = getReg(CI);
+ BuildMI(BB, X86::SETPr, 0, TmpReg2);
+ return;
+
case Intrinsic::memcpy: {
assert(CI.getNumOperands() == 5 && "Illegal llvm.memcpy call!");
unsigned Align = 1;
diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp
index 8745090..984257c 100644
--- a/lib/Target/X86/X86ISelSimple.cpp
+++ b/lib/Target/X86/X86ISelSimple.cpp
@@ -1664,6 +1664,7 @@ void ISel::LowerUnknownIntrinsicFunctionCalls(Function &F) {
case Intrinsic::memcpy:
case Intrinsic::memset:
case Intrinsic::isnan:
+ case Intrinsic::isunordered:
case Intrinsic::readport:
case Intrinsic::writeport:
// We directly implement these intrinsics
@@ -1742,6 +1743,14 @@ void ISel::visitIntrinsicCall(Intrinsic::ID ID, CallInst &CI) {
BuildMI(BB, X86::SETPr, 0, TmpReg2);
return;
+ case Intrinsic::isunordered:
+ TmpReg1 = getReg(CI.getOperand(1));
+ TmpReg2 = getReg(CI.getOperand(2));
+ emitUCOMr(BB, BB->end(), TmpReg2, TmpReg1);
+ TmpReg2 = getReg(CI);
+ BuildMI(BB, X86::SETPr, 0, TmpReg2);
+ return;
+
case Intrinsic::memcpy: {
assert(CI.getNumOperands() == 5 && "Illegal llvm.memcpy call!");
unsigned Align = 1;