summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-08-09 06:17:48 +0000
committerCraig Topper <craig.topper@intel.com>2017-08-09 06:17:48 +0000
commit5706c01c0bc47369507f4edcd6c605566eefa4d5 (patch)
tree75584d331d5edbf9ebd4ce0d7f461ac4b529b4b4 /llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
parent2fd1ff81b4505508f0996bd83752a7e455fc7ae8 (diff)
downloadbcm5719-llvm-5706c01c0bc47369507f4edcd6c605566eefa4d5.tar.gz
bcm5719-llvm-5706c01c0bc47369507f4edcd6c605566eefa4d5.zip
[InstCombine] Use regular dyn_cast instead of a matcher for a simple case. NFC
llvm-svn: 310446
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 4279427a8b9..0aea1edb0d0 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -997,8 +997,8 @@ bool InstCombiner::shouldOptimizeCast(CastInst *CI) {
/// Fold {and,or,xor} (cast X), C.
static Instruction *foldLogicCastConstant(BinaryOperator &Logic, CastInst *Cast,
InstCombiner::BuilderTy &Builder) {
- Constant *C;
- if (!match(Logic.getOperand(1), m_Constant(C)))
+ Constant *C = dyn_cast<Constant>(Logic.getOperand(1));
+ if (!C)
return nullptr;
auto LogicOpc = Logic.getOpcode();
OpenPOWER on IntegriCloud