summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-10-22 22:56:20 +0000
committerattilio <attilio@FreeBSD.org>2011-10-22 22:56:20 +0000
commit4be1d1f7d25274261562ad10fb8197d48da0d113 (patch)
treea5939a4eeef7c173fb98194a6a23499c9b5a561d /contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
parent62842622e5f4dd7e394cb2530b955c9818aaeec0 (diff)
parentd5b30f0715769670b0cb9e859e79e85cc990f441 (diff)
downloadFreeBSD-src-4be1d1f7d25274261562ad10fb8197d48da0d113.zip
FreeBSD-src-4be1d1f7d25274261562ad10fb8197d48da0d113.tar.gz
MFC
Diffstat (limited to 'contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp')
-rw-r--r--contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
index 7b91fea..f877c65 100644
--- a/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
+++ b/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
@@ -80,7 +80,7 @@ namespace {
// Otherwise we don't know that the it's okay to zapnot this entire
// byte. Only do this iff we can prove that the missing bits are
// already null, so the bytezap doesn't need to really null them.
- BitsToCheck |= ~Constant & (0xFF << 8*i);
+ BitsToCheck |= ~Constant & (0xFFULL << 8*i);
}
}
}
@@ -114,9 +114,8 @@ namespace {
if (!x) return 0;
unsigned at = CountLeadingZeros_64(x);
uint64_t complow = 1ULL << (63 - at);
- uint64_t comphigh = 1ULL << (64 - at);
- //cerr << x << ":" << complow << ":" << comphigh << "\n";
- if (abs64(complow - x) <= abs64(comphigh - x))
+ uint64_t comphigh = complow << 1;
+ if (x - complow <= comphigh - x)
return complow;
else
return comphigh;
OpenPOWER on IntegriCloud