mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
[FastISel] Fix a potential bug in FastEmitInst_ri
FastEmitInst_ri was constraining the first operand without checking if it is a virtual register. Use constrainOperandRegClass as all the other FastEmitInst_* functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216613 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b92f447ab
commit
fc68dad43c
@ -1816,8 +1816,7 @@ unsigned FastISel::FastEmitInst_ri(unsigned MachineInstOpcode,
|
||||
const MCInstrDesc &II = TII.get(MachineInstOpcode);
|
||||
|
||||
unsigned ResultReg = createResultReg(RC);
|
||||
RC = TII.getRegClass(II, II.getNumDefs(), &TRI, *FuncInfo.MF);
|
||||
MRI.constrainRegClass(Op0, RC);
|
||||
Op0 = constrainOperandRegClass(II, Op0, II.getNumDefs());
|
||||
|
||||
if (II.getNumDefs() >= 1)
|
||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, II, ResultReg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user