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

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 05:07:06 PDT 2021


sebastian-ne updated this revision to Diff 381515.
sebastian-ne marked an inline comment as done.
sebastian-ne added a comment.

> Maybe it's impossible for there to be tail instructions after a branch is removed?

It’s not impossible, which is exactly what this patch fixes (because S_MOV_B32_term are terminators but not branch instructions, so they stay and should prevent merging even after branch instructions are removed).

> The phi updates only run for blocks in TDBBs…

Ups, you’re right, I got it wrong, it actually updates them for blocks *not* in TDBBs.

I changed it, so it returns if `Changed` was `false` before.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112226/new/

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.381515.patch
Type: text/x-patch
Size: 6255 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211022/facaee22/attachment.bin>


More information about the llvm-commits mailing list