1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Fix a crash compiling povray on UINT_TO_FP from i16.

llvm-svn: 19499
This commit is contained in:
Chris Lattner 2005-01-12 04:00:00 +00:00
parent e7945a2e2e
commit 3c85c67c97

View File

@ -350,8 +350,6 @@ namespace {
// registers required to compute each node.
ComputeRegPressure(DAG.getRoot());
//DAG.viewGraph();
// Codegen the basic block.
Select(DAG.getRoot());
@ -1244,7 +1242,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
default: break; // No promotion required.
}
if (Node->getOpcode() == ISD::UINT_TO_FP && SrcTy == MVT::i32) {
if (Node->getOpcode() == ISD::UINT_TO_FP && Result != RealDestReg) {
// If this is a cast from uint -> double, we need to be careful when if
// the "sign" bit is set. If so, we don't want to make a negative number,
// we want to make a positive number. Emit code to add an offset if the