AMDGPU/GlobalISel: Fix lower for f64->f16 G_FPTRUNC
authorPetar Avramovic <Petar.Avramovic@amd.com>
Thu, 11 Jun 2020 15:55:59 +0000 (17:55 +0200)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Thu, 11 Jun 2020 16:19:27 +0000 (18:19 +0200)
commitbd3d951b8bb9861c3171a322a3407151444923b0
treec7ba8e43fa0a421aa939564011e8aa0b36a5cb5e
parent5ee571735ddf1f81db3df5d7328c86432209e3b4
AMDGPU/GlobalISel: Fix lower for f64->f16 G_FPTRUNC

Put AND before ADD in LegalizerHelper::lowerFPTRUNC_F64_TO_F16
in order to match algorithm from AMDGPUTargetLowering::LowerFP_TO_FP16.

Differential Revision: https://reviews.llvm.org/D81666
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fptrunc.mir