[PATCH] D144053: [LICM] Ensure LICM can hoist invariant.group

William Moses via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 15:37:23 PST 2023


wsmoses created this revision.
wsmoses added reviewers: jdoerfert, nikic, Prazek, asbirlea.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
wsmoses requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Invariant.group's are not sufficiently handled by LICM. Specifically,
if a given invariant.group loaded pointer is not overwritten between
the start of a loop, and its use in the load, it can be hoisted.
The invariant.group (on an already invariant pointer operand) ensures
the result is the same. If it is not overwritten between the start
of the loop and the load, it is therefore legal to hoist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144053

Files:
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/test/Transforms/LICM/invariant.group.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144053.497462.patch
Type: text/x-patch
Size: 4946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230214/c1e60073/attachment.bin>


More information about the llvm-commits mailing list