================
@@ -8407,10 +8410,18 @@ static SDValue performEXTENDCombine(SDNode *N, 
SelectionDAG &DAG,
   EVT VT = N->getValueType(0);
   SDLoc DL(N);
 
-  if (VT.isVector())
+  if (VT.isVector()) {
     if (SDValue R = PromoteMaskArithmetic(SDValue(N, 0), DL, DAG, Subtarget))
       return R;
 
+    if (SDValue R = matchHalfOf128BitLanes(N->getOperand(0), false)) {
+      if (N->getOpcode() == ISD::SIGN_EXTEND)
+        return DAG.getNode(LoongArchISD::VEXTH, DL, VT, R);
+      else if (N->getOpcode() == ISD::ZERO_EXTEND)
----------------
wangleiat wrote:

[Don’t use else after a return](https://llvm.org/docs/CodingStandards.html#id41)

https://github.com/llvm/llvm-project/pull/207316
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to