Assert that ValueHandleBase::ValueIsRAUWd doesn't change the tracked Value type.
authorFrederic Riss <friss@apple.com>
Thu, 23 Oct 2014 04:08:42 +0000 (04:08 +0000)
committerFrederic Riss <friss@apple.com>
Thu, 23 Oct 2014 04:08:42 +0000 (04:08 +0000)
commitc1892e2d48e4dcc34c55e64b494ddbe723644c68
treec89d4334877af7d56c7be64bedbc6f02b2054b4f
parent05ad2e543f237aea9076f26d9ebddc91200e43f4
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

llvm-svn: 220468
llvm/lib/IR/Value.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp