[all-commits] [llvm/llvm-project] 19dc02: [MergeICmps] Allow sinking past non-load/store

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Aug 23 13:04:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19dc02e99f802922a3af69e802465bee0723b57a
      https://github.com/llvm/llvm-project/commit/19dc02e99f802922a3af69e802465bee0723b57a
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MergeICmps.cpp
    M llvm/test/Transforms/MergeICmps/X86/split-block-does-work.ll

  Log Message:
  -----------
  [MergeICmps] Allow sinking past non-load/store

This is a followup to D106591. MergeICmps currently only allows
sinking the loads past either instructions that don't write to
memory at all, or simple loads/stores that don't modify the memory
the loads access.

The "simple loads/stores" part of this check doesn't seem necessary
to me -- AA isModRef() already accurately models any operation
that may clobber the memory. For example, in the adjusted test case
the transform is still fine if the call to @foo() isn't readonly,
but inaccessiblememonly -- in both cases, the call cannot modify
the loaded memory.

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




More information about the All-commits mailing list