[AMDGPU] Fix s_branch with -1 offset
authorSam Kolton <Sam.Kolton@amd.com>
Mon, 19 Sep 2016 10:20:55 +0000 (10:20 +0000)
committerSam Kolton <Sam.Kolton@amd.com>
Mon, 19 Sep 2016 10:20:55 +0000 (10:20 +0000)
commitbe7ffb90bf09ae293eacfdbf15ad946f9ab12ecb
treef8a388e7c22f197407783f9813831edd98f30312
parentc941252374b901333cb6e9c3fa0345890137e46e
[AMDGPU] Fix s_branch with -1 offset

Summary:
In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0.
'''
label:
    s_branch label  // should emit [0xff,0xff,0x82,0xbf]
'''

Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result.

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl

Differential Revision: https://reviews.llvm.org/D24671

llvm-svn: 281896
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
llvm/test/MC/AMDGPU/labels-branch.s