Closed linzj closed 2 years ago
mentioned in issue llvm/llvm-bugzilla-archive#16545
This bug has been marked as a duplicate of bug llvm/llvm-bugzilla-archive#16545
Manjian, This might be something to email to the llvm-commits list as a patch. Please provide a testcase.
Extended Description
LDR_POST_IMM emits texts like that: ldr r2, [r5], #4 str r2, [r0], #4 subs r1, r1, #4 bne .LBB35_1 which couldn't be recognized by binutils' as. And these code are generated by memcpy. Is that normal? And I tried to change its definition from: def _POST_IMM : AI2ldstidx<0, isByte, 0, (outs GPR:$Rn_wb), (ins GPR:$Rt, addr_offset_none:$addr, am2offset_imm:$offset), IndexModePost, StFrm, iii, opc, "\t$Rt, $addr, $offset", "$addr.base = $Rn_wb", []> { to: def _POST_IMM : AI2ldstidx<0, isByte, 0, (outs GPR:$Rn_wb), (ins GPR:$Rt, addr_offset_none:$addr, am2offset_imm:$offset), IndexModePost, StFrm, iii, opc, "\t$Rt, $addr!", "$addr.base = $Rn_wb", []> { and llvm seemed to generate the acceptable code: ldr r2, [r5]! str r2, [r0]!