[PATCH] D67703: Insertion of unconditional branch during FastISel when debug information is enabled

David Tellenbach via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 06:19:13 PDT 2019


tellenbach created this revision.
Herald added subscribers: llvm-commits, hiraditya, aprantl.
Herald added a project: LLVM.

The insertion of an unconditional branch during FastISel can differ depending on building with or without debug information. This happens because `void FastISel::fastEmitBranch` emits an unconditional branch depending on the size of the current basic block without distinguishing between debug and non-debug instructions.

This patch fixes this issue by ignoring debug instructions when getting the size of the basic block.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67703

Files:
  llvm/include/llvm/IR/BasicBlock.h
  llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  llvm/lib/IR/BasicBlock.cpp
  llvm/test/CodeGen/AArch64/fast-isel-branch-uncond-debug.ll
  llvm/unittests/IR/BasicBlockTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67703.220654.patch
Type: text/x-patch
Size: 4975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190918/4ddf64b3/attachment.bin>


More information about the llvm-commits mailing list