mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Add support for FSQRT node, patch contributed by Morten Ofstad
llvm-svn: 21610
This commit is contained in:
parent
fb0d0ea349
commit
27a534f181
@ -1830,12 +1830,16 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
||||
return Result;
|
||||
|
||||
case ISD::FABS:
|
||||
Tmp1 = SelectExpr(Node->getOperand(0));
|
||||
BuildMI(BB, X86::FABS, 1, Result).addReg(Tmp1);
|
||||
return Result;
|
||||
case ISD::FNEG:
|
||||
case ISD::FSQRT:
|
||||
assert(N.getValueType()==MVT::f64 && "Illegal type for this operation");
|
||||
Tmp1 = SelectExpr(Node->getOperand(0));
|
||||
BuildMI(BB, X86::FCHS, 1, Result).addReg(Tmp1);
|
||||
switch (N.getOpcode()) {
|
||||
default: assert(0 && "Unreachable!");
|
||||
case ISD::FABS: BuildMI(BB, X86::FABS, 1, Result).addReg(Tmp1); break;
|
||||
case ISD::FNEG: BuildMI(BB, X86::FCHS, 1, Result).addReg(Tmp1); break;
|
||||
case ISD::FSQRT: BuildMI(BB, X86::FSQRT, 1, Result).addReg(Tmp1); break;
|
||||
}
|
||||
return Result;
|
||||
|
||||
case ISD::MULHU:
|
||||
|
Loading…
Reference in New Issue
Block a user