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:
parent
93fe1e2fb1
commit
2d7576a90a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user