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

Justin Fargnoli via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 15:34:43 PDT 2024


================
@@ -15195,7 +15195,8 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
   case ISD::OR:
   case ISD::XOR:
     if (!LegalOperations && N0.hasOneUse() &&
-        (isConstantOrConstantVector(N0.getOperand(0), true) ||
+        (TLI.shouldReduceRegisterPressure() ||
+         isConstantOrConstantVector(N0.getOperand(0), true) ||
----------------
justinfargnoli wrote:

TODO: copy checks from `hoiseLogicOpWithSameOpcodeHands()` to here. 

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


More information about the llvm-commits mailing list