1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

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 93fe1e2fb1
commit 2d7576a90a

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;