[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)
commit770e106ed6083a62c67ff7da6accab4c88c77f60
treeb4bedc6f119e57a57ba81ad143e7c7d9c2be3e0c
parent7ebbc8de2fe5639906d5e8f07c4c0ff435395882
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230276 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
test/CodeGen/X86/fastmath-float-half-conversion.ll [new file with mode: 0644]