[X86] Teach how to custom lower double-to-half conversions under fast-math.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 23 Feb 2015 22:59:02 +0000 (22:59 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 23 Feb 2015 22:59:02 +0000 (22:59 +0000)
commitaf3f397b10da571d108327d3c0d60e8dc85024e8
treef14ac6ea5803d7dfda2175c512b96c2d69d07b97
parent913dfd8f7f88645fc4de85fc28b0209448a9edfe
[X86] Teach how to custom lower double-to-half conversions under fast-math.

This patch teaches the backend how to expand a double-half conversion into
a double-float conversion immediately followed by a float-half conversion.
We do this only under fast-math, and if float-half conversions are legal
for the target.

Added test CodeGen/X86/fastmath-float-half-conversion.ll

Differential Revision: http://reviews.llvm.org/D7832

llvm-svn: 230276
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/test/CodeGen/X86/fastmath-float-half-conversion.ll [new file with mode: 0644]