mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
ARM: constrain register-class in fast-isel
The tests were no longer using fast-isel at all (MachO needs an "ios" rather than "darwin" triple at the moment and Linux needs ARM mode). Once that was corrected, the verifier complained about a t2ADDri created for the alloca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -801,9 +801,11 @@ unsigned ARMFastISel::TargetMaterializeAlloca(const AllocaInst *AI) {
|
||||
// This will get lowered later into the correct offsets and registers
|
||||
// via rewriteXFrameIndex.
|
||||
if (SI != FuncInfo.StaticAllocaMap.end()) {
|
||||
unsigned Opc = isThumb2 ? ARM::t2ADDri : ARM::ADDri;
|
||||
const TargetRegisterClass* RC = TLI.getRegClassFor(VT);
|
||||
unsigned ResultReg = createResultReg(RC);
|
||||
unsigned Opc = isThumb2 ? ARM::t2ADDri : ARM::ADDri;
|
||||
ResultReg = constrainOperandRegClass(TII.get(Opc), ResultReg, 0);
|
||||
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||
TII.get(Opc), ResultReg)
|
||||
.addFrameIndex(SI->second)
|
||||
|
||||
Reference in New Issue
Block a user