[llvm] r263343 - remove unnecessary cast; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 12 10:17:41 PST 2016
Author: spatel
Date: Sat Mar 12 12:17:41 2016
New Revision: 263343
URL: http://llvm.org/viewvc/llvm-project?rev=263343&view=rev
Log:
remove unnecessary cast; NFC
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=263343&r1=263342&r2=263343&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Sat Mar 12 12:17:41 2016
@@ -1935,10 +1935,9 @@ static bool FoldTwoEntryPHINode(PHINode
Value *TrueVal = PN->getIncomingValue(PN->getIncomingBlock(0) == IfFalse);
Value *FalseVal = PN->getIncomingValue(PN->getIncomingBlock(0) == IfTrue);
- SelectInst *NV =
- cast<SelectInst>(Builder.CreateSelect(IfCond, TrueVal, FalseVal, ""));
- PN->replaceAllUsesWith(NV);
- NV->takeName(PN);
+ Value *Select = Builder.CreateSelect(IfCond, TrueVal, FalseVal);
+ PN->replaceAllUsesWith(Select);
+ Select->takeName(PN);
PN->eraseFromParent();
}
More information about the llvm-commits
mailing list