[llvm] [NVPTX] Propagate truncate to operands (PR #98666)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 12:23:09 PDT 2024


================
@@ -5974,6 +6023,10 @@ SDValue NVPTXTargetLowering::PerformDAGCombine(SDNode *N,
     case ISD::VSELECT:
       return PerformVSELECTCombine(N, DCI);
   }
+
+  if (N->isMachineOpcode() && N->getMachineOpcode() == NVPTX::CVT_u32_u64)
+    return PerformTruncCombine(N, DCI);
+
----------------
Artem-B wrote:

Another special case that may not be necessary if the optimization is moved to DAGToDAG, and only deals with machine nodes.

https://github.com/llvm/llvm-project/pull/98666


More information about the llvm-commits mailing list