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
This commit is contained in:
Chris Lattner 2004-06-15 21:36:44 +00:00
parent 5e9a7ca75a
commit dc5724478e
2 changed files with 18 additions and 0 deletions

View File

@ -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;

View File

@ -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;