[llvm] [AMDGPU] Fix canonicalization of truncated values. (PR #83054)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 22:40: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))))
----------------
arsenm wrote:
(Commenting in the right place this time)
This is a specific instance of isGuaranteedNotToBePoison; it would be better to reframe this in terms of a new DAG clone of the ValueTracking helper
https://github.com/llvm/llvm-project/pull/83054
More information about the llvm-commits
mailing list