summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-03-12 18:17:41 +0000
committerSanjay Patel <spatel@rotateright.com>2016-03-12 18:17:41 +0000
commit5658b589365e35afa65eab08ee3eac6061a3f46b (patch)
tree557aeb0b4a29f8c63655a8b6e4498563d2ddae32 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp
parent2e0027706a7b7ac844e40a6df81c4a72a5cc26c6 (diff)
downloadbcm5719-llvm-5658b589365e35afa65eab08ee3eac6061a3f46b.tar.gz
bcm5719-llvm-5658b589365e35afa65eab08ee3eac6061a3f46b.zip
remove unnecessary cast; NFC
llvm-svn: 263343
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 1eff0badb65..9f9375b80de 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1935,10 +1935,9 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI,
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();
}
OpenPOWER on IntegriCloud