diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-04-22 14:12:50 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-04-22 14:12:50 +0000 |
commit | bfd695d591c20242a2bd7544a0f9edb8018c7ba2 (patch) | |
tree | 978c77298ac88e397f52838feb86a00daf356ffe /llvm/lib/Transforms | |
parent | 9a878c4930b586bac36495aedfbceabab6906cd1 (diff) | |
download | bcm5719-llvm-bfd695d591c20242a2bd7544a0f9edb8018c7ba2.tar.gz bcm5719-llvm-bfd695d591c20242a2bd7544a0f9edb8018c7ba2.zip |
[EarlyCSE] Don't add the overflow flags to the hash
We take the intersection of overflow flags while CSE'ing.
This permits us to consider two instructions with different overflow
behavior to be replaceable.
llvm-svn: 267153
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp index efa843cd8c9..949300b94a7 100644 --- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp @@ -97,15 +97,6 @@ unsigned DenseMapInfo<SimpleValue>::getHashValue(SimpleValue Val) { if (BinOp->isCommutative() && BinOp->getOperand(0) > BinOp->getOperand(1)) std::swap(LHS, RHS); - if (isa<OverflowingBinaryOperator>(BinOp)) { - // Hash the overflow behavior - unsigned Overflow = - BinOp->hasNoSignedWrap() * OverflowingBinaryOperator::NoSignedWrap | - BinOp->hasNoUnsignedWrap() * - OverflowingBinaryOperator::NoUnsignedWrap; - return hash_combine(BinOp->getOpcode(), Overflow, LHS, RHS); - } - return hash_combine(BinOp->getOpcode(), LHS, RHS); } |