]> granicus.if.org Git - llvm/commit
[DebugInfo][AArch64] Recognise target specific instruction as mov instr
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 22 May 2019 18:48:58 +0000 (18:48 +0000)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 22 May 2019 18:48:58 +0000 (18:48 +0000)
commita6f4bcfeb5d88b8e86919400383b8cd9b5e237cc
treeab9f064c33dcf3cf2f4ddf7eb7058f8b5f68e328
parent7b98fc0e462e3ccaceb8a643c7116a5b0f09eb49
[DebugInfo][AArch64] Recognise target specific instruction as mov instr

This fix is for the problem from https://bugs.llvm.org/show_bug.cgi?id=38714.
Specifically, Simple Register Coalescing creates following conversion :

 undef %0.sub_32:gpr64 = ORRWrs $wzr, %3:gpr32common, 0, debug-location !24;

It copies 32-bit value from gpr32 into gpr64. But Live DEBUG_VALUE analysis
is not able to create debug location record for that instruction. So the problem
is in that debug info for argc variable is incorrect. The fix is
to write custom isCopyInstrImpl() which would recognize the ORRWrs instr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361417 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrInfo.cpp
lib/Target/AArch64/AArch64InstrInfo.h
test/CodeGen/AArch64/aarch64-mov-debug-locs.mir [new file with mode: 0644]