]> granicus.if.org Git - llvm/commit
[AMDGPU] fcaninicalize optimization for GFX9+
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 13 Jul 2017 23:59:15 +0000 (23:59 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 13 Jul 2017 23:59:15 +0000 (23:59 +0000)
commit9fc15af9b29d7ffeb84cf5f9fcdbdc8dcc127c65
treea408b5c0d1112410e9c5df7df506519af1480652
parente302dc70dd0fcdb3eae6d6ca882589744dec484b
[AMDGPU] fcaninicalize optimization for GFX9+

Since GFX9 supports denorm modes for v_min_f32/v_max_f32 that
is possible to further optimize fcanonicalize and remove it
if applied to min/max given their operands are known not to be
an sNaN or that sNaNs are not supported.

Additionally we can remove fcanonicalize if denorms are supported
for the VT and we know that its argument is never a NaN.

Differential Revision: https://reviews.llvm.org/D35335

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307976 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUSubtarget.h
lib/Target/AMDGPU/SIISelLowering.cpp
test/CodeGen/AMDGPU/fcanonicalize-elimination.ll