diff options
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index c48fa2f3f7..6169730ce8 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -108,10 +108,8 @@ static bool RemoveSingularPHIs(BasicBlock *BB) { } static void ReplaceUsesWithConstant(Instruction *I) { - Constant *CPV = Constant::getNullConstant(I->getType()); - // Make all users of this instruction reference the constant instead - I->replaceAllUsesWith(CPV); + I->replaceAllUsesWith(Constant::getNullValue(I->getType())); } // PropogatePredecessors - This gets "Succ" ready to have the predecessors from |