AMDGPU: Fold fmed3 of fpext sources to f16 fmed3
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 5 May 2023 17:16:58 +0000 (13:16 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 18 May 2023 07:34:46 +0000 (08:34 +0100)
commit8f3e64624c2e49b61ee578aec493260a59a35e80
tree74129de67a8cc685850164dbbd979ae041f10083
parentb233eb70cd82ca3c320fac4bb8c2cccd1fe97696
AMDGPU: Fold fmed3 of fpext sources to f16 fmed3

InstCombine already does this for minnum/maxnum. If we
also apply this to fmed3, we don't need to explicitly
use 16-bit fmed3 if we're not sure the target
supports 16-bit instructions yet.
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
llvm/test/Transforms/InstCombine/AMDGPU/fmed3.ll