[PATCH] D129997: [Local] Allow creating callbr with duplicate successors

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 03:56:31 PDT 2022


nikic created this revision.
nikic added reviewers: nickdesaulniers, nathanchance, efriedma, jyknight.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Since D129288 <https://reviews.llvm.org/D129288>, callbr is allowed to have duplicate successors. This patch removes a limitation which prevents optimizations from actually producing such callbrs.

This is probably the riskiest of all the recent callbr changes, because code with incorrect assumptions might be lurking somewhere. I fixed the one case I encountered ahead of time in https://github.com/llvm/llvm-project/commit/8201e3ef5c84561260218bc041209611aac690e3.


https://reviews.llvm.org/D129997

Files:
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll
  llvm/test/Transforms/JumpThreading/callbr-edge-split.ll
  llvm/test/Transforms/JumpThreading/pr46857-callbr.ll
  llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
  llvm/test/Transforms/SimplifyCFG/jump-threading.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129997.445447.patch
Type: text/x-patch
Size: 5173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220718/a4284455/attachment.bin>


More information about the llvm-commits mailing list