Add support for expanding PPC 128 bit floats.
authorDuncan Sands <baldrick@free.fr>
Wed, 25 Jun 2008 20:24:48 +0000 (20:24 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 25 Jun 2008 20:24:48 +0000 (20:24 +0000)
commit041cde26eaf4ef6171ff1a44aeedd08d7a1cba6c
treea03698fc2af048b49f4eba950164b08bff721fd1
parent18e045983757a7d2bae482d2abe444a5bb3ed134
Add support for expanding PPC 128 bit floats.
For this it is convenient to permit floats to
be used with EXTRACT_ELEMENT, so I tweaked
things to allow that.  I also added libcalls
for ppcf128 to i32 forms of FP_TO_XINT, since
they exist in libgcc and this case can certainly
occur (and does occur in the testsuite) - before
the i64 libcall was being used.  Also, the
XINT_TO_FP result seemed to be wrong when
the argument is an i128: the wrong fudge
factor was added (the i32 and i64 cases were
handled directly, but the i128 code fell
through to some generic softening code which
seemed to think it was i64 to f32!).  So I
fixed it by adding a fudge factor that I
found in my breakfast cereal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52739 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/RuntimeLibcalls.h
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp