llvm-6502/lib/Transforms
Juergen Ributzka 5cfc91c9a5 [Constant Hoisting] Fix multiple entries for the same basic block in PHI nodes.
A PHI node usually has only one value/basic block pair per incoming basic block.
In the case of a switch statement it is possible that a following PHI node may
have more than one such pair per incoming basic block. E.g.:
%0 = phi i64 [ 123456, %case2 ], [ 654321, %Entry ], [ 654321, %Entry ]
This is valid and the verfier doesn't complain, because both values are the
same.

Constant hoisting materializes the constant for each operand separately and the
value is still the same, but the variable names have changed. As a result the
verfier can't recognize anymore that they are the same value and complains.

This fix adds special update code for PHI node in constant hoisting to prevent
this corner case.

This fixes <rdar://problem/16394449>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204537 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-22 01:49:27 +00:00
..
Hello [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
InstCombine Fix a bug in InstCombine where we would incorrectly attempt to construct a 2014-03-13 22:51:43 +00:00
Instrumentation Remove some dead assignements found by scan-build 2014-03-21 21:54:46 +00:00
IPO [C++11] Change DebugInfoFinder to use range-based loops 2014-03-18 09:41:07 +00:00
ObjCARC Fix use_iterator crash in ObjCArc from r203364 2014-03-18 22:32:43 +00:00
Scalar [Constant Hoisting] Fix multiple entries for the same basic block in PHI nodes. 2014-03-22 01:49:27 +00:00
Utils Remove LowerInvoke's obsolete "-enable-correct-eh-support" option 2014-03-20 19:54:47 +00:00
Vectorize [LV] While I'm here, use range based for loops which are so much cleaner 2014-03-18 22:00:32 +00:00
CMakeLists.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
LLVMBuild.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
Makefile Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00