Fix FP_TO_UINT->i32 on ppc32 -mcpu=g5. This was
authorDale Johannesen <dalej@apple.com>
Thu, 4 Jun 2009 20:53:52 +0000 (20:53 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 4 Jun 2009 20:53:52 +0000 (20:53 +0000)
commit4c9369df57a52cec5e1fc735e61a979766288074
tree08e184c70ec5bc8698fe30859e040f72156e6514
parent073e7e5807991a9f614569426fdd6536728c01ca
Fix FP_TO_UINT->i32 on ppc32 -mcpu=g5.  This was
using Promote which won't work because i64 isn't
a legal type.  It's easy enough to use Custom, but
then we have the problem that when the type
legalizer is promoting FP_TO_UINT->i16, it has no
way of telling it should prefer FP_TO_SINT->i32
to FP_TO_UINT->i32.  I have uncomfortably hacked
this by making the type legalizer choose FP_TO_SINT
when both are Custom.
This fixes several regressions in the testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72891 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h