[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Aug 16 23:06:36 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.69 -> 1.70
---
Log message:
Fix a regression on X86, where FP values can be promoted too.
---
Diffs of the changes: (+4 -1)
SelectionDAGISel.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.69 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.70
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.69 Tue Aug 16 16:55:35 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Aug 17 01:06:25 2005
@@ -991,7 +991,10 @@
return DAG.getCopyToReg(SDL.getRoot(), Reg, Op);
} else if (SrcVT < DestVT) {
// The src value is promoted to the register.
- Op = DAG.getNode(ISD::ZERO_EXTEND, DestVT, Op);
+ if (MVT::isFloatingPoint(SrcVT))
+ Op = DAG.getNode(ISD::FP_EXTEND, DestVT, Op);
+ else
+ Op = DAG.getNode(ISD::ZERO_EXTEND, DestVT, Op);
return DAG.getCopyToReg(SDL.getRoot(), Reg, Op);
} else {
// The src value is expanded into multiple registers.
More information about the llvm-commits
mailing list