llvm-project/llvm/test/CodeGen/AVR/pseudo
Dylan McKay 6afef286d9 [AVR] Fix codegen bug in 16-bit loads
Prior to this patch, the AVR::LDWRdPtr instruction was always lowered to
instructions of this pattern:

    ld  $GPR8, [PTR:XYZ]+
    ld  $GPR8, [PTR]+1

This has a problem; the [PTR] is incremented in-place once, but never
decremented.

Future uses of the same pointer will use the now clobbered value,
leading to the pointer being incorrect by an offset of one.

This patch modifies the expansion code of the LDWRdPtr pseudo
instruction so that the pointer variable is not silently clobbered in
future uses in the same live range.

Bug first reported by Keshav Kini.

Patch by Kaushik Phatak.

llvm-svn: 351673
2019-01-20 03:41:08 +00:00
..
ADCWRdRr.mir
ADDWRdRr.mir
ANDIWRdK.mir
ANDWRdRr.mir
ASRWRd.mir
COMWRd.mir
CPCWRdRr.mir
CPWRdRr.mir
EORWRdRr.mir
FRMIDX.mir
INWRdA.mir
LDDWRdPtrQ-same-src-dst.mir [AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination 2018-11-05 05:00:44 +00:00
LDDWRdPtrQ.mir [AVR] Disallow the LDDWRdPtrQ instruction with Z as the destination 2018-11-05 05:00:44 +00:00
LDDWRdYQ.mir
LDIWRdK.mir
LDSWRdK.mir
LDWRdPtr-same-src-dst.mir [AVR] Fix codegen bug in 16-bit loads 2019-01-20 03:41:08 +00:00
LDWRdPtr.mir [AVR] Fix codegen bug in 16-bit loads 2019-01-20 03:41:08 +00:00
LDWRdPtrPd.mir
LDWRdPtrPi.mir
LSLWRd.mir [AVR] Redefine the 'LSL' instruction as an alias of 'ADD' 2018-09-01 12:23:00 +00:00
LSRWRd.mir
ORIWRdK.mir
ORWRdRr.mir
OUTWARr.mir
POPWRd.mir
PUSHWRr.mir
SBCIWRdK.mir
SBCWRdRr.mir
SEXT.mir [AVR] Redefine the 'LSL' instruction as an alias of 'ADD' 2018-09-01 12:23:00 +00:00
STDWPtrQRr.mir
STSWKRr.mir
STWPtrPdRr.mir
STWPtrPiRr.mir
STWPtrRr.mir
SUBIWRdK.mir
SUBWRdRr.mir
ZEXT.mir [AVR] Redefine the 'LSL' instruction as an alias of 'ADD' 2018-09-01 12:23:00 +00:00