[llvm] r278659 - [Thumb] Validate branch target for CBZ/CBNZ instructions.

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 11:26:45 PDT 2016


On 15 August 2016 at 19:14, Reid Kleckner via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> How can we avoid this error? Shouldn't LLVM be responsible for relaxing this
> into some other code sequence?

I believe so.

>From what I can see, this is not a hand-written assembly, but a C code
that somehow uses CBZ to branch either backwards, or at an odd or too
far offset. This is clearly a codegen error on LLVM's side and a bug
should be filled in LLVM's Bugzilla, too.

I don't know how you could work around this in that case, but the
check is correct, so reverting it would be bad. But a temporary
revert, until we find the codegen bug would be totally acceptable,
IMO.

cheers,
--renato


More information about the llvm-commits mailing list