AMDGPU/GlobalISel: Legalize f64 G_FFLOOR for SI
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 24 Jan 2020 15:01:15 +0000 (10:01 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Wed, 5 Feb 2020 19:32:01 +0000 (14:32 -0500)
commit5aa6e246a1e44655a66581bc2ca6a20e3051e7e9
tree0ccc27f50c92468654e6ec25d8f3f5d8da27ef72
parente5ba52dc8126f3d9c6282c361196b6bb0f82cc71
AMDGPU/GlobalISel: Legalize f64 G_FFLOOR for SI

Use cmp ord instead of cmp_class compared to the DAG version for the
nan check, but mostly try to match the existsing pattern.

I think the sign doesn't matter for fract, so we could do a little
better with the source modifier matching.

I think this is also still broken as in D22898, but I'm leaving it
as-is for now while I don't have an SI system to test on.
12 files changed:
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/CodeGen/AMDGPU/GlobalISel/floor.f64.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ffloor.mir [deleted file]
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ffloor.s32.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-ffloor.s64.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ffloor.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fptosi.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fptoui.mir