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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
---|---|---|
731 | For constants, you need to check that they are exactly representable as half, otherwise this could change the result. |
Comment Actions
Please add a test case for a constant that can't be losslessly converted. OK with that.
For constants, you need to check that they are exactly representable as half, otherwise this could change the result.