mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-28 15:38:57 +00:00
Fix a regression on X86, where FP values can be promoted too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22822 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6c26da6c04
commit
fae59b99b8
@ -991,7 +991,10 @@ CopyValueToVirtualRegister(SelectionDAGLowering &SDL, Value *V, unsigned Reg) {
|
|||||||
return DAG.getCopyToReg(SDL.getRoot(), Reg, Op);
|
return DAG.getCopyToReg(SDL.getRoot(), Reg, Op);
|
||||||
} else if (SrcVT < DestVT) {
|
} else if (SrcVT < DestVT) {
|
||||||
// The src value is promoted to the register.
|
// 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);
|
return DAG.getCopyToReg(SDL.getRoot(), Reg, Op);
|
||||||
} else {
|
} else {
|
||||||
// The src value is expanded into multiple registers.
|
// The src value is expanded into multiple registers.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user