mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Assert that ValueHandleBase::ValueIsRAUWd doesn't change the tracked Value type.
This invariant is enforced in Value::replaceAllUsesWith, thus it seems logical to apply it also to ValueHandles. This commit fixes InstCombine to not trigger the assertion during the removal of constant bitcasts in call instructions. Differential Revision: http://reviews.llvm.org/D5828 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -773,6 +773,8 @@ void ValueHandleBase::ValueIsDeleted(Value *V) {
|
||||
void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
|
||||
assert(Old->HasValueHandle &&"Should only be called if ValueHandles present");
|
||||
assert(Old != New && "Changing value into itself!");
|
||||
assert(Old->getType() == New->getType() &&
|
||||
"replaceAllUses of value with new value of different type!");
|
||||
|
||||
// Get the linked list base, which is guaranteed to exist since the
|
||||
// HasValueHandle flag is set.
|
||||
|
Reference in New Issue
Block a user