[InstCombine] Use regular dyn_cast instead of a matcher for a simple case. NFC

llvm-svn: 310446
This commit is contained in:
Craig Topper 2017-08-09 06:17:48 +00:00
parent 2fd1ff81b4
commit 5706c01c0b
1 changed files with 2 additions and 2 deletions

View File

@ -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();