[llvm] [LoongArch] Fix assertion failure in performORCombine (PR #141586)

Lu Weining via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 05:36:28 PDT 2025


================
@@ -4410,7 +4410,7 @@ static SDValue performORCombine(SDNode *N, SelectionDAG &DAG,
     LLVM_DEBUG(dbgs() << "Perform OR combine: match pattern 5\n");
     return DAG.getNode(
         LoongArchISD::BSTRINS, DL, ValTy, N0.getOperand(0),
-        DAG.getConstant(CN1->getSExtValue() >> MaskIdx0, DL, ValTy),
+        DAG.getSignedConstant(CN1->getSExtValue() >> MaskIdx0, DL, ValTy),
----------------
SixWeining wrote:

Do other calls to `DAG.getConstant()` have the same issue?

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


More information about the llvm-commits mailing list