[LegalizeDAG] Convert strict fp nodes to libcalls without losing the chain.
authorCraig Topper <craig.topper@intel.com>
Mon, 18 Nov 2019 19:14:13 +0000 (11:14 -0800)
committerCraig Topper <craig.topper@intel.com>
Mon, 18 Nov 2019 19:24:08 +0000 (11:24 -0800)
commit6e20d70a695028099b1705cfcfd1373d9d62e747
treef471d78f65bd0f07d1528fa88a67caef0f816a9e
parentad5a84c883354e8bb595ebfd9971fe4a14b770fd
[LegalizeDAG] Convert strict fp nodes to libcalls without losing the chain.

Previously we mutated the node and then converted it to a libcall. But this loses the chain information.

This patch keeps the chain, but unfortunately breaks tail call optimization as the functions involved in deciding if a node is in tail call position can't handle the chain. But correct ordering seems more important to be right.

Somehow the SystemZ tests improved. I looked at one of them and it seemed that we're handling the split vector elements in a different order and that made the copies work better.

Differential Revision: https://reviews.llvm.org/D70334
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/test/CodeGen/SystemZ/vector-constrained-fp-intrinsics.ll
llvm/test/CodeGen/X86/fp-intrinsics-fma.ll
llvm/test/CodeGen/X86/fp-intrinsics.ll
llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll