mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +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);
|
||||
} 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.
|
||||
|
Loading…
Reference in New Issue
Block a user