[PATCH] D90784: [GVN] Fix MemorySSA update when replacing assume(false) with stores.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 12:18:21 PST 2020


fhahn created this revision.
fhahn added reviewers: asbirlea, nikic, george.burgess.iv.
Herald added subscribers: hiraditya, Prazek.
Herald added a project: LLVM.
fhahn requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90784

Files:
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/test/Transforms/GVN/preserve-memoryssa.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90784.302932.patch
Type: text/x-patch
Size: 3988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201104/8e7257c7/attachment.bin>


More information about the llvm-commits mailing list