[llvm-branch-commits] [llvm] [LoongArch] Combine rounded vector shifts to VSRLR/VSRAR (PR #192921)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 23 20:54:25 PDT 2026


================
@@ -5439,6 +5441,139 @@ static SDValue combineAndNotIntoVANDN(SDNode *N, const SDLoc &DL,
   return DAG.getNode(LoongArchISD::VANDN, DL, VT, X, Y);
 }
 
+static bool isConstantSplatVector(SDValue N, APInt &SplatValue,
+                                  unsigned MinSizeInBits) {
+  if (N->getOpcode() == ISD::BITCAST)
----------------
wangleiat wrote:

Consider using `peekThroughBitcasts(N)` instead of manually stripping one BITCAST.

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


More information about the llvm-branch-commits mailing list