[ARM GlobalISel] Legalize G_FPEXT and G_FPTRUNC
authorDiana Picus <diana.picus@linaro.org>
Wed, 17 Jan 2018 13:34:10 +0000 (13:34 +0000)
committerDiana Picus <diana.picus@linaro.org>
Wed, 17 Jan 2018 13:34:10 +0000 (13:34 +0000)
commit65ed364fac666fe132812adbcd23e8b53b14a526
tree6378bf315c2b3ca1582c37fd371ba4a4d898b91f
parent4d0ff0c74d35e6c5bfc60c3864e8ac7655737f8f
[ARM GlobalISel] Legalize G_FPEXT and G_FPTRUNC

Mark G_FPEXT and G_FPTRUNC as legal or libcall, depending on hardware
support, but only for conversions between float and double.

Also add the necessary boilerplate so that the LegalizerHelper can
introduce the required libcalls. This also works only for float and
double, but isn't too difficult to extend when the need arises.

llvm-svn: 322651
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
llvm/test/CodeGen/ARM/GlobalISel/arm-legalize-fp.mir