InstSimplify: Fold a hasNoUnsignedWrap() call into a match() expression

No functionality change intended, it's just a little more concise.

llvm-svn: 221280
This commit is contained in:
David Majnemer 2014-11-04 17:38:50 +00:00
parent 9ff912db22
commit 4f438377fb
1 changed files with 1 additions and 2 deletions

View File

@ -1371,8 +1371,7 @@ static Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact,
// (X << A) >> A -> X
Value *X;
if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1))) &&
cast<OverflowingBinaryOperator>(Op0)->hasNoUnsignedWrap())
if (match(Op0, m_NUWShl(m_Value(X), m_Specific(Op1))))
return X;
return nullptr;