1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Transforms/GVNHoist
Alexandros Lamprineas 8d73ea30c1 [MemorySSAUpdater] Avoid creating self-referencing MemoryDefs
Fix for https://bugs.llvm.org/show_bug.cgi?id=38807, which occurred
while compiling SemaTemplateInstantiate.cpp with clang and GVNHoist
enabled. In the following example:

      1=def(entry)
      /        \
2=def(1)       4=def(1)
3=def(2)       5=def(4)

When removing the MemoryDef 2=def(1) from its basic block, and just
before adding it to the end of the parent basic block, we first
replace all its uses with the defining memory access:

3=def(2) -> 3=def(1)

Then we call insertDef for adding 2=def(1) to the parent basic block,
where we replace the uses of 1=def(entry) with 2=def(1). Doing so we
create a self reference:

2=def(1) -> 2=def(2)  (bad)
3=def(1) -> 3=def(2)  (ok)
4=def(1) -> 4=def(2)  (ok)

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

llvm-svn: 341947
2018-09-11 14:29:59 +00:00
..
hoist-call.ll
hoist-convergent.ll
hoist-inline.ll
hoist-md.ll [Local] Make DoesKMove required for combineMetadata. 2018-08-24 11:40:04 +00:00
hoist-more-than-two-branches.ll
hoist-mssa.ll
hoist-newgvn.ll
hoist-pr20242.ll
hoist-pr22005.ll
hoist-pr28606.ll
hoist-pr28933.ll
hoist-pr31891.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
hoist-recursive-geps.ll
hoist-simplify-phi.ll
hoist-unsafe-pr31729.ll
hoist-very-busy.ll
hoist.ll
infinite-loop-direct.ll
infinite-loop-indirect.ll
int_sideeffect.ll
ld_hoist1.ll
ld_hoist_st_sink.ll
non-trivial-phi.ll
pr28626.ll
pr29031.ll
pr29034.ll
pr30216.ll
pr30499.ll
pr35222-hoist-load.ll
pr36787.ll [GVNHoist] safeToHoistLdSt allows illegal hoisting 2018-07-23 09:42:35 +00:00
pr37445.ll [MemorySSAUpdater] Update Phi operands after trivial Phi elimination 2018-07-23 10:56:30 +00:00
pr37808.ll [MemorySSAUpdater] Remove deleted trivial Phis from active workset 2018-07-16 07:51:27 +00:00
pr38807.ll [MemorySSAUpdater] Avoid creating self-referencing MemoryDefs 2018-09-11 14:29:59 +00:00