projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c26da6
)
Fix a regression on X86, where FP values can be promoted too.
author
Chris Lattner
<sabre@nondot.org>
Wed, 17 Aug 2005 06:06:25 +0000
(06:06 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 17 Aug 2005 06:06:25 +0000
(06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22822
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 44553afa3c3626c12ffacf52ce6e2da09f0234b5..7303ee2add2035304999bac38004d559e0e7be47 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@
-991,7
+991,10
@@
CopyValueToVirtualRegister(SelectionDAGLowering &SDL, Value *V, unsigned Reg) {
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.