diff options
author | Dale Johannesen <dalej@apple.com> | 2009-05-13 00:24:22 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-05-13 00:24:22 +0000 |
commit | 7b9486ad4355a010d22e0737cee9cd7c7b747ece (patch) | |
tree | b7bfebbf35cc0ff04599b78130048ee6b8f163b9 /lib/Target/Alpha/AlphaInstrInfo.td | |
parent | 0e0da734bbdfa1d3f55cd04db31d83b97e4556f7 (diff) | |
download | external_llvm-7b9486ad4355a010d22e0737cee9cd7c7b747ece.zip external_llvm-7b9486ad4355a010d22e0737cee9cd7c7b747ece.tar.gz external_llvm-7b9486ad4355a010d22e0737cee9cd7c7b747ece.tar.bz2 |
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.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaInstrInfo.td')
-rw-r--r-- | lib/Target/Alpha/AlphaInstrInfo.td | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/Alpha/AlphaInstrInfo.td b/lib/Target/Alpha/AlphaInstrInfo.td index ae92825..e73bdf9 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.td +++ b/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) { |