[llvm] [RISCV] Fix crash in combinePExtTruncate for truncate(srl) without MUL/SUB (PR #186141)

Kito Cheng via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 08:51:26 PDT 2026


================
@@ -16965,6 +16965,10 @@ static SDValue combinePExtTruncate(SDNode *N, SelectionDAG &DAG,
     }
   }
 
+  // Ensure Op is a binary operation before accessing its operands.
+  if (Op.getNumOperands() < 2)
----------------
kito-cheng wrote:

updated

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


More information about the llvm-commits mailing list