hanchenye-llvm-project/llvm/test/CodeGen/AVR
Dylan McKay 4c5a5c8db6 [AVR] Fix a backend bug that left extraneous operands after expansion
This patch fixes a bug in the AVR FRMIDX expansion logic.

The expansion would leave a leftover operand from the original FRMIDX,
but now attached to a MOVWRdRr instruction. The MOVWRdRr instruction
did not expect this operand and so LLVM rejected the machine
instruction.

This would trigger an assertion:

    Assertion failed: ((isImpReg || Op.isRegMask() || MCID->isVariadic() ||
                        OpNo < MCID->getNumOperands() || isMetaDataOp) &&
                        "Trying to add an operand to a machine instr that is already done!"),
    function addOperand, file llvm/lib/CodeGen/MachineInstr.cpp

Tim fixed this so that now the FRMIDX is expanded correctly into
a well-formed MOVWRdRr.

Patch by Tim Neumann

llvm-svn: 346117
2018-11-05 05:49:04 +00:00
..
atomics
calling-conv/c
features
inline-asm
integration
intrinsics
pseudo [AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination 2018-11-05 05:00:44 +00:00
relax-mem
PR31344.ll
PR31345.ll
add.ll
alloca.ll
and.ll
branch-relaxation-long.ll
branch-relaxation.ll
brind.ll
call.ll [AVR] Fix the 'call.ll' CodeGen test 2018-10-10 03:21:42 +00:00
clear-bss.ll
cmp.ll
com.ll
copy-data-to-ram.ll
ctlz.ll
ctpop.ll
cttz.ll
directmem.ll
div.ll
dynalloca.ll
eor.ll
expand-integer-failure.ll
frame.ll
frmidx-iterator-bug.ll
high-pressure-on-ptrregs.ll
icall-func-pointer-correct-addr-space.ll
impossible-reg-to-reg-copy.ll
interrupts.ll
io.ll
issue-cannot-select-bswap.ll
issue-regalloc-stackframe-folding-earlyclobber.ll
large-return-size.ll
lit.local.cfg
load.ll
lower-formal-args-struct-return.ll
lower-formal-arguments-assertion.ll
mul.ll
neg.ll
no-print-operand-twice.ll
or.ll
progmem-extended.ll
progmem.ll
rem.ll
return.ll
rot.ll
runtime-trig.ll
rust-avr-bug-37.ll [AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination 2018-11-05 05:00:44 +00:00
rust-avr-bug-95.ll [AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination 2018-11-05 05:00:44 +00:00
rust-avr-bug-99.ll
rust-avr-bug-112.ll [AVR] Fix a backend bug that left extraneous operands after expansion 2018-11-05 05:49:04 +00:00
select-must-add-unconditional-jump.ll
sext.ll
shift.ll
sign-extension.ll
smul-with-overflow.ll
std-ldd-immediate-overflow.ll
store-undef.ll
store.ll
sub.ll
trunc.ll
umul-with-overflow.ll
unaligned-atomic-loads.ll
varargs.ll
xor.ll
zext.ll