llvm-project/llvm/test/Transforms/CodeGenPrepare/X86
Serguei Katkov a20e05bb94 [CGP] Fix the remove of matched phis in complex addressing mode
When we replace the Phi we created with matched ones it is possible that
there are two identical phi nodes in IR. And matcher is smart enough to find that
new created phi matches both of them. So we try to replace our phi node with
matched ones twice and what is bad we delete our phi node twice causing a crash.

As soon as we found that we have two identical Phi nodes it makes sense to do
a clean-up and replace one phi node by other one.
The patch implements it.

Reviewers: john.brawn, reames
Reviewed By: john.brawn
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43758

llvm-svn: 327250
2018-03-12 03:50:07 +00:00
..
catchpad-phi-cast.ll
computedgoto.ll Turn on -addr-sink-using-gep by default. 2017-04-06 22:42:18 +00:00
cttz-ctlz.ll
extend-sink-hoist.ll
fcmp-sinking.ll
lit.local.cfg
memset_chk-simplify-nobuiltin.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
pr27536.ll
pr35658.ll [CGP] Fix the handling select inst in complex addressing mode 2017-12-18 04:25:07 +00:00
select.ll Regenerate select test. NFCI. 2018-01-23 21:50:46 +00:00
sink-addrmode-base.ll [CGP] Fix common type handling in optimizeMemoryInst 2017-11-29 05:51:26 +00:00
sink-addrmode-select.ll [CGP] Fix the GV handling in complex addressing mode 2018-01-23 12:07:49 +00:00
sink-addrmode-two-phi.ll [CGP] Fix the remove of matched phis in complex addressing mode 2018-03-12 03:50:07 +00:00
sink-addrmode.ll Remove stray comma in sink-addrmode test 2017-11-16 15:15:00 +00:00
sink-addrspacecast.ll Turn on -addr-sink-using-gep by default. 2017-04-06 22:42:18 +00:00
widen_switch.ll [CodeGenPrep] Skip merging empty case blocks 2016-12-16 20:38:39 +00:00
x86-shuffle-sink.ll [X86][XOP] Update isVectorShiftByScalarCheap with cases covered by XOP 2018-01-30 18:10:21 +00:00