1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

fix setcc on floats, fixes singlesource:pi, perhaps others

llvm-svn: 20172
This commit is contained in:
Andrew Lenharth 2005-02-14 05:41:43 +00:00
parent 8a13d9e16f
commit f023ce8d97

View File

@ -63,6 +63,8 @@ namespace {
setOperationAction(ISD::MEMSET , MVT::Other, Expand);
setOperationAction(ISD::MEMCPY , MVT::Other, Expand);
setOperationAction(ISD::SETCC , MVT::f32, Promote);
computeRegisterProperties();
addLegalFPImmediate(+0.0); //F31
@ -1109,15 +1111,17 @@ unsigned ISel::SelectExpr(SDOperand N) {
//Can only compare doubles, and dag won't promote for me
if (SetCC->getOperand(0).getValueType() == MVT::f32)
{
std::cerr << "Setcc On float?\n";
Tmp3 = MakeReg(MVT::f64);
BuildMI(BB, Alpha::CVTST, 1, Tmp3).addReg(Tmp1);
Tmp1 = Tmp3;
}
if (SetCC->getOperand(1).getValueType() == MVT::f32)
{
std::cerr << "Setcc On float?\n";
Tmp3 = MakeReg(MVT::f64);
BuildMI(BB, Alpha::CVTST, 1, Tmp3).addReg(Tmp2);
Tmp1 = Tmp2;
Tmp2 = Tmp3;
}
if (rev) std::swap(Tmp1, Tmp2);