[AMDGPU][MC] Corrected branch relocation handling to detect undefined labels
authorDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>
Mon, 18 May 2020 11:04:58 +0000 (14:04 +0300)
committerDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>
Mon, 18 May 2020 11:04:58 +0000 (14:04 +0300)
commitf997370d9c8f4a67e495312078ca7b6dc2e94fa4
tree54d49b48c4fdced041806429c39ed08d3abfcbe8
parent968d293063bc008ff93ff8fcf363039ce61574a2
[AMDGPU][MC] Corrected branch relocation handling to detect undefined labels

Fixed ELF object writer to die gracefully when an undefined label is encountered in a branch instruction.
See https://bugs.llvm.org/show_bug.cgi?id=41914.

Reviewers: arsenm, rampitec

Differential Revision: https://reviews.llvm.org/D79943
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
llvm/test/MC/AMDGPU/labels-branch-err.s [new file with mode: 0644]