aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 268b654d14..78b6c3df7b 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -127,7 +127,7 @@ private:
//
inline bool markOverdefined(Value *V) {
if (ValueState[V].markOverdefined()) {
- if (Instruction *I = V->castInstruction()) {
+ if (Instruction *I = dyn_cast<Instruction>(V)) {
//cerr << "markOverdefined: " << V;
InstWorkList.push_back(I); // Only instructions go on the work list
}
@@ -497,7 +497,7 @@ void SCCP::UpdateInstruction(Instruction *I) {
//
void SCCP::OperandChangedState(User *U) {
// Only instructions use other variable values!
- Instruction *I = U->castInstructionAsserting();
+ Instruction *I = cast<Instruction>(U);
if (!BBExecutable.count(I->getParent())) return; // Inst not executable yet!
UpdateInstruction(I);