llvm-project/llvm/lib/Transforms
Florian Hahn 1807c516c7 [NewGVN] Update phi-of-ops def block when updating existing ValuePHI.
In case we update a ValuePHI node created earlier, we could update it
based on a different OpPHI which could be in a different block.
We need to update the TempToBlock mapping reflecting the new block,
otherwise we would end up placing the new phi node in a wrong block.

This problem is exposed by the test case in
https://bugs.llvm.org/show_bug.cgi?id=36504.

This patch fixes a slightly simpler problem than in the bug report. In
the bug's re-producer, the additional problem is that we are re-using a
ValuePHI node with to few incoming values for the new OpPHI. If this
patch makes sense, I will follow it up with a patch that creates a new
PHI node if the existing PHI node has a different number of incoming
values.

Reviewers: davide, dberlin

Reviewed By: dberlin

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

llvm-svn: 326181
2018-02-27 09:34:51 +00:00
..
AggressiveInstCombine [AggressiveInstCombine] Fixed TruncCombine class to handle TruncInst leaf node correctly. 2018-01-31 22:39:05 +00:00
Coroutines [Coroutines] Move debug statement before assert 2018-02-19 20:50:09 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO Update comment for whether or not we can optimize an alias - we're 2018-02-22 23:12:11 +00:00
InstCombine [InstCombine] allow fdiv folds with less than fully 'fast' ops 2018-02-26 16:02:45 +00:00
Instrumentation Fix DataFlowSanitizer instrumentation pass to take parameter position changes into account for custom functions. 2018-02-22 19:09:07 +00:00
ObjCARC [ObjCARC] Do not turn a call to @objc_autoreleaseReturnValue into a call 2018-01-19 23:51:13 +00:00
Scalar [NewGVN] Update phi-of-ops def block when updating existing ValuePHI. 2018-02-27 09:34:51 +00:00
Utils [Debug] Add dbg.value intrinsics for PHIs created during LCSSA. 2018-02-23 17:38:27 +00:00
Vectorize [LV] Move isLegalMasked* functions from Legality to CostModel 2018-02-26 11:06:36 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00