diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-08-28 16:06:33 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-08-28 16:06:33 +0000 |
commit | 1d8a886c596501f21366556b6e1e2d889a0b63dd (patch) | |
tree | 2c53b1138615e374e7383fd6b73dc4a019c05fa3 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | |
parent | 420327269e238b26148e0304682340195ee9a23b (diff) | |
download | bcm5719-llvm-1d8a886c596501f21366556b6e1e2d889a0b63dd.tar.gz bcm5719-llvm-1d8a886c596501f21366556b6e1e2d889a0b63dd.zip |
Reduce scope of variable only used in a local pattern match. NFCI.
llvm-svn: 370224
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index e8282b3bc13..8f67f842c45 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -610,7 +610,6 @@ Value *InstCombiner::tryFactorization(BinaryOperator &I, HasNUW &= ROBO->hasNoUnsignedWrap(); } - const APInt *CInt; if (TopLevelOpcode == Instruction::Add && InnerOpcode == Instruction::Mul) { // We can propagate 'nsw' if we know that @@ -620,6 +619,7 @@ Value *InstCombiner::tryFactorization(BinaryOperator &I, // %Z = mul nsw i16 %X, C+1 // // iff C+1 isn't INT_MIN + const APInt *CInt; if (match(V, m_APInt(CInt))) { if (!CInt->isMinSignedValue()) BO->setHasNoSignedWrap(HasNSW); |