[all-commits] [llvm/llvm-project] 58eac8: [LICM] Ensure LICM can hoist invariant.group

William Moses via All-commits all-commits at lists.llvm.org
Sun Feb 26 09:41:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58eac856ccc0d7d0f6760b07c6be1537d970cda3
      https://github.com/llvm/llvm-project/commit/58eac856ccc0d7d0f6760b07c6be1537d970cda3
  Author: William S. Moses <gh at wsmoses.com>
  Date:   2023-02-26 (Sun, 26 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LICM.cpp
    A llvm/test/Transforms/LICM/invariant.group.ll

  Log Message:
  -----------
  [LICM] Ensure LICM can hoist invariant.group

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.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D144053




More information about the All-commits mailing list