GlobalISel: Fix round lowering
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 14 Mar 2020 18:52:48 +0000 (14:52 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Mon, 16 Mar 2020 15:37:30 +0000 (11:37 -0400)
commit19a0350187906532b9aa9dcb1f6af95f9c2e8cc1
treef877f6e31445daaa80ba89ea1a489eeaa3c0f1c0
parent4060016fce3e6a0b926ee9fc59e440a612d3a2ec
GlobalISel: Fix round lowering

I used the implementation for floor instead of round. It also turns
out the OpenCL builtin library wasn't using the round builtin, but
implemented the expanded form.
llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-intrinsic-round.mir
llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp