AMDGPU/GlobalISel: Remove redundant G_FCANONICALIZE
authorPetar Avramovic <Petar.Avramovic@amd.com>
Tue, 27 Apr 2021 10:21:57 +0000 (12:21 +0200)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Tue, 27 Apr 2021 10:26:37 +0000 (12:26 +0200)
commitfb7be0d912cbcba68803456fbde3fd311b3922ed
tree9c72d4e2bd620834b46c363b37383476b7497bea
parent7f98209da6349891b7a74eeadace34d38e7aaadc
AMDGPU/GlobalISel: Remove redundant G_FCANONICALIZE

Add basic version of isCanonicalized for global-isel. Copied from sdag.
Add post legalizer combine that deletes G_FCANONICALIZE when its input
is already Canonicalized.

Differential Revision: https://reviews.llvm.org/D96605
llvm/lib/Target/AMDGPU/AMDGPUCombine.td
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.h
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fcanonicalize.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll