[PATCH] D112226: [TailDuplicator] Fix merging block with terminator

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 21 08:15:47 PDT 2021


sebastian-ne created this revision.
sebastian-ne added reviewers: arsenm, foad.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely.
sebastian-ne requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

The TailDuplicator merged two blocks, even if the first one ended with
a terminator, resulting in invalid MIR, where a terminator is in the
middle of a block.

Abort merging if the first block ends with a terminator.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112226

Files:
  llvm/lib/CodeGen/TailDuplicator.cpp
  llvm/test/CodeGen/AMDGPU/early-tailduplicator-terminator.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112226.381272.patch
Type: text/x-patch
Size: 6109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211021/f2aebdc4/attachment.bin>


More information about the llvm-commits mailing list