mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Fix a crash compiling povray on UINT_TO_FP from i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7944d9d995
commit
085c9955ca
@ -350,8 +350,6 @@ namespace {
|
|||||||
// registers required to compute each node.
|
// registers required to compute each node.
|
||||||
ComputeRegPressure(DAG.getRoot());
|
ComputeRegPressure(DAG.getRoot());
|
||||||
|
|
||||||
//DAG.viewGraph();
|
|
||||||
|
|
||||||
// Codegen the basic block.
|
// Codegen the basic block.
|
||||||
Select(DAG.getRoot());
|
Select(DAG.getRoot());
|
||||||
|
|
||||||
@ -1244,7 +1242,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
|||||||
default: break; // No promotion required.
|
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
|
// 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,
|
// 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
|
// we want to make a positive number. Emit code to add an offset if the
|
||||||
|
Loading…
Reference in New Issue
Block a user