[llvm] [AMDGPU] Fix canonicalization of truncated values. (PR #83054)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 02:41:25 PST 2024
================
@@ -26258,6 +26258,24 @@ SDValue DAGCombiner::visitFP_TO_FP16(SDNode *N) {
if (N0->getOpcode() == ISD::FP16_TO_FP)
return N0->getOperand(0);
+ // fold (fp_to_fp16 (freeze (fp16_to_fp (fp_to_fp16 op))))
----------------
hvdijk wrote:
1) indeed does not sound very extendable, and I suspect we will get more optimisable operations in the future.
2) is what @arsenm briefly suggested earlier, before suggesting that maybe it should be done even later. It's very hard to do without regressions, but whether any of the regressions will count as *significant* is hard to say in advance.
https://github.com/llvm/llvm-project/pull/83054
More information about the llvm-commits
mailing list