InstSimplify: Fold a hasNoSignedWrap() call into a match() expression
No functionality change intended, it's just a little more concise. llvm-svn: 221281
This commit is contained in:
parent
4f438377fb
commit
2de97fcd9a
|
@ -1408,8 +1408,7 @@ static Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
|
||||||
|
|
||||||
// (X << A) >> A -> X
|
// (X << A) >> A -> X
|
||||||
Value *X;
|
Value *X;
|
||||||
if (match(Op0, m_Shl(m_Value(X), m_Specific(Op1))) &&
|
if (match(Op0, m_NSWShl(m_Value(X), m_Specific(Op1))))
|
||||||
cast<OverflowingBinaryOperator>(Op0)->hasNoSignedWrap())
|
|
||||||
return X;
|
return X;
|
||||||
|
|
||||||
// Arithmetic shifting an all-sign-bit value is a no-op.
|
// Arithmetic shifting an all-sign-bit value is a no-op.
|
||||||
|
|
Loading…
Reference in New Issue