diff options
| author | Tim Shen <timshen91@gmail.com> | 2017-01-23 22:39:35 +0000 |
|---|---|---|
| committer | Tim Shen <timshen91@gmail.com> | 2017-01-23 22:39:35 +0000 |
| commit | fd1e5aa8dffa8b26e59fb340668b264b9ac80382 (patch) | |
| tree | 61c9f22bd15cd3ebb3f84e6d1889cbc21a09af5d /llvm/test/CodeGen | |
| parent | 09cca093a390725df66af1a45ef0eb4aa695b5e5 (diff) | |
| download | bcm5719-llvm-fd1e5aa8dffa8b26e59fb340668b264b9ac80382.tar.gz bcm5719-llvm-fd1e5aa8dffa8b26e59fb340668b264b9ac80382.zip | |
[APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)
Summary:
This patch changes the layout of DoubleAPFloat, and adjust all
operations to do either:
1) (IEEEdouble, IEEEdouble) -> (uint64_t, uint64_t) -> PPCDoubleDoubleImpl,
then run the old algorithm.
2) Do the right thing directly.
1) includes multiply, divide, remainder, mod, fusedMultiplyAdd, roundToIntegral,
convertFromString, next, convertToInteger, convertFromAPInt,
convertFromSignExtendedInteger, convertFromZeroExtendedInteger,
convertToHexString, toString, getExactInverse.
2) includes makeZero, makeLargest, makeSmallest, makeSmallestNormalized,
compare, bitwiseIsEqual, bitcastToAPInt, isDenormal, isSmallest,
isLargest, isInteger, ilogb, scalbn, frexp, hash_value, Profile.
I could split this into two patches, e.g. use
1) for all operatoins first, then incrementally change some of them to
2). I didn't do that, because 1) involves code that converts data between
PPCDoubleDoubleImpl and (IEEEdouble, IEEEdouble) back and forth, and may
pessimize the compiler. Instead, I find easy functions and use
approach 2) for them directly.
Next step is to implement move multiply and divide from 1) to 2). I don't
have plans for other functions in 1).
Differential Revision: https://reviews.llvm.org/D27872
llvm-svn: 292839
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll b/llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll index 2e537cd8a56..37120a56f4d 100644 --- a/llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll +++ b/llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll @@ -128,7 +128,7 @@ entry: ; PPC32-DAG: oris {{[0-9]+}}, [[FLIP_BIT]], 16399 ; PPC32-DAG: xoris {{[0-9]+}}, [[FLIP_BIT]], 48304 ; PPC32: blr - %0 = tail call ppc_fp128 @llvm.copysign.ppcf128(ppc_fp128 0xMBCB0000000000000400F000000000000, ppc_fp128 %x) + %0 = tail call ppc_fp128 @llvm.copysign.ppcf128(ppc_fp128 0xM400F000000000000BCB0000000000000, ppc_fp128 %x) %1 = bitcast ppc_fp128 %0 to i128 ret i128 %1 } |

