[all-commits] [llvm/llvm-project] be0578: [GVN] Fix MemorySSA update when replacing assume(f...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Nov 5 04:11:35 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: be0578f0b44dfe6a3c3715a1c77b6ee9b6b65d3f
      https://github.com/llvm/llvm-project/commit/be0578f0b44dfe6a3c3715a1c77b6ee9b6b65d3f
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-11-05 (Thu, 05 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/test/Transforms/GVN/preserve-memoryssa.ll

  Log Message:
  -----------
  [GVN] Fix MemorySSA update when replacing assume(false) with stores.

When replacing an assume(false) with a store, we have to be more careful
with the order we insert the new access. This patch updates the code to
look at the accesses in the block to find a suitable insertion point.

Alterantively we could check the defining access of the assume, but IIRC
there has been some discussion about making assume() readnone, so
looking at the access list might be more future proof.

Fixes PR48072.

Reviewed By: asbirlea

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




More information about the All-commits mailing list