mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
Cannot create a result register for non-legal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143749 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
774ec45f3d
commit
451afbc6a2
@ -552,8 +552,9 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, EVT VT) {
|
||||
// do so now.
|
||||
const ConstantInt *CI = cast<ConstantInt>(C);
|
||||
if (Subtarget->hasV6T2Ops() && isUInt<16>(CI->getZExtValue())) {
|
||||
EVT SrcVT = MVT::i32;
|
||||
unsigned Opc = isThumb ? ARM::t2MOVi16 : ARM::MOVi16;
|
||||
unsigned ImmReg = createResultReg(TLI.getRegClassFor(VT));
|
||||
unsigned ImmReg = createResultReg(TLI.getRegClassFor(SrcVT));
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||
TII.get(Opc), ImmReg)
|
||||
.addImm(CI->getSExtValue()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user