[PATCH] D136463: [SWP] Recognize mem carried dep with different base

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 09:26:14 PDT 2022


thopre created this revision.
thopre added reviewers: bcahoon, qcolombet, sebpop, arvindsm, marksl, kparzysz.
Herald added a subscriber: hiraditya.
Herald added a project: All.
thopre requested review of this revision.
Herald added a project: LLVM.

The loop-carried dependency detection logic in isLoopCarriedDep relies
on the load and store using the same definition for the base register.
This misses the case of post-increment loads and stores whose base
register are different PHI initialized from the same initial value.

This commit extends the logic to accept the load and store having
different PHI base address provided that they had the same initial value
when entering the loop and are incremented by the same amount in each
loop.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136463

Files:
  llvm/lib/CodeGen/MachinePipeliner.cpp
  llvm/test/CodeGen/Hexagon/swp-carried-dep3.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136463.469655.patch
Type: text/x-patch
Size: 5371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221021/e50caf37/attachment.bin>


More information about the llvm-commits mailing list