mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 21:34:23 +00:00
Fix X86/inline-asm.ll:test2, a case where an input value was implicitly
truncated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
586e65357b
commit
0c48fd4610
@ -1804,9 +1804,12 @@ void RegsForValue::getCopyToRegs(SDOperand Val, SelectionDAG &DAG,
|
||||
// If there is a single register and the types differ, this must be
|
||||
// a promotion.
|
||||
if (RegVT != ValueVT) {
|
||||
if (MVT::isInteger(RegVT))
|
||||
Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val);
|
||||
else
|
||||
if (MVT::isInteger(RegVT)) {
|
||||
if (RegVT < ValueVT)
|
||||
Val = DAG.getNode(ISD::TRUNCATE, RegVT, Val);
|
||||
else
|
||||
Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val);
|
||||
} else
|
||||
Val = DAG.getNode(ISD::FP_EXTEND, RegVT, Val);
|
||||
}
|
||||
Chain = DAG.getCopyToReg(Chain, Regs[0], Val, Flag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user