[PATCH] D135846: [PowerPC] handle 3 predecessor loop header in ctrloop pass

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 20:31:21 PDT 2022


shchenz created this revision.
shchenz added reviewers: lkail, PowerPC.
Herald added subscribers: kbarton, hiraditya, nemanjai.
Herald added a project: All.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

  After ISEL, the "valid" loop header which has two predecessors
  (one is preheader and the other one is latch) may be transformed
  to have three predecessors by some optimizations, like tail duplicator.
  The three predecessors are preheader, loop latch and the header itself
  if the header is a single block loop.
  
  Before the patch, ctrloop pass assumes two predecessors for candidate
  loop header. This patch fixes this case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135846

Files:
  llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
  llvm/test/CodeGen/PowerPC/ctrloop-header-three-preds.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135846.467353.patch
Type: text/x-patch
Size: 5305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221013/cd972a7e/attachment.bin>


More information about the llvm-commits mailing list