Add ExpandFloatOp_FCOPYSIGN to handle ppcf128-related expansions
authorHal Finkel <hfinkel@anl.gov>
Mon, 19 Aug 2013 06:55:37 +0000 (06:55 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 19 Aug 2013 06:55:37 +0000 (06:55 +0000)
commita0e735ee16f439675c1842e47ba3149aa226bdc0
treedbcd56d75481104d7a897f903194e0ba76b47c43
parentc892bd6a74ba92b5631c89cfac8961a8005b644a
Add ExpandFloatOp_FCOPYSIGN to handle ppcf128-related expansions

We had previously been asserting when faced with a FCOPYSIGN f64, ppcf128 node
because there was no way to expand the FCOPYSIGN node. Because ppcf128 is the
sum of two doubles, and the first double must have the larger magnitude, we
can take the sign from the first double. As a result, in addition to fixing the
crash, this is also an optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188655 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
test/CodeGen/PowerPC/copysignl.ll [new file with mode: 0644]