getNegatedExpression should handle FP16_TO_FP and FP_TO_FP16
Open
floating-point
good first issue
llvm:SelectionDAG
missed-optimization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
[getNegatedExpression](https://github.com/llvm/llvm-project/blob/e89a99e26db168f99e928f6a82cab0df13a77c96/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp#L7556) does not handle the opcodes FP16_TO_FP and FP_TO_FP16, but it could. This could improve use of source modifiers on AMDGPU with illegal f16.
I started implementing it in this patch, but it requires additional work to avoid regressions.
[0001-DAG-Implement-getNegatedExpression-for-FP16_TO_FP.patch](https://github.com/user-attachments/files/24806027/0001-DAG-Implement-getNegatedExpression-for-FP16_TO_FP.patch)
Contributor guide
Assessment
This issue has not been assessed yet.