summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-04-22 14:12:50 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-04-22 14:12:50 +0000
commitbfd695d591c20242a2bd7544a0f9edb8018c7ba2 (patch)
tree978c77298ac88e397f52838feb86a00daf356ffe /llvm/lib/Transforms
parent9a878c4930b586bac36495aedfbceabab6906cd1 (diff)
downloadbcm5719-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.cpp9
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);
}
OpenPOWER on IntegriCloud