summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-05-13 00:24:22 +0000
committerDale Johannesen <dalej@apple.com>2009-05-13 00:24:22 +0000
commit536de01bcfa09dd175fa5f965af3e0d8a19ab7d9 (patch)
tree467217d0079d594f833e8546d8ce6247d254203f /llvm/lib/Target/Alpha
parent98d7164ab0b46856b7a1e475a7f173f6800a97c7 (diff)
downloadbcm5719-llvm-536de01bcfa09dd175fa5f965af3e0d8a19ab7d9.tar.gz
bcm5719-llvm-536de01bcfa09dd175fa5f965af3e0d8a19ab7d9.zip
Add an int64_t variant of abs, for host environments
without one. Use it where we were using abs on int64_t objects. (I strongly suspect the casts to unsigned in the fragments in LoopStrengthReduce are not doing whatever the original intent was, but the obvious change to uint64_t doesn't work. Maybe later.) llvm-svn: 71612
Diffstat (limited to 'llvm/lib/Target/Alpha')
-rw-r--r--llvm/lib/Target/Alpha/AlphaInstrInfo.td4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaInstrInfo.td b/llvm/lib/Target/Alpha/AlphaInstrInfo.td
index ae9282564d1..e73bdf9f6e9 100644
--- a/llvm/lib/Target/Alpha/AlphaInstrInfo.td
+++ b/llvm/lib/Target/Alpha/AlphaInstrInfo.td
@@ -69,7 +69,7 @@ def nearP2X : SDNodeXForm<imm, [{
}]>;
def nearP2RemX : SDNodeXForm<imm, [{
uint64_t x =
- abs(N->getZExtValue() - getNearPower2((uint64_t)N->getZExtValue()));
+ abs64(N->getZExtValue() - getNearPower2((uint64_t)N->getZExtValue()));
return getI64Imm(Log2_64(x));
}]>;
@@ -124,7 +124,7 @@ def immRemP2 : PatLeaf<(imm), [{
getNearPower2((uint64_t)N->getZExtValue()));
}]>;
def immUExt8ME : PatLeaf<(imm), [{ //use this imm for mulqi
- int64_t d = abs((int64_t)N->getZExtValue() -
+ int64_t d = abs64((int64_t)N->getZExtValue() -
(int64_t)getNearPower2((uint64_t)N->getZExtValue()));
if (isPowerOf2_64(d)) return false;
switch (d) {
OpenPOWER on IntegriCloud