[llvm] [AArch64] Handle ANY_EXTEND in BuildShuffleExtendCombine (PR #118308)

Hari Limaye via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 03:57:58 PST 2024


================
@@ -18594,7 +18608,10 @@ static SDValue performBuildShuffleExtendCombine(SDValue BV, SelectionDAG &DAG) {
                                    : BV.getOperand(1).getOperand(0),
                                cast<ShuffleVectorSDNode>(BV)->getMask());
   }
-  return DAG.getNode(IsSExt ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND, DL, VT, NBV);
+  unsigned ExtOpc = !SeenZExtOrSExt ? ISD::ANY_EXTEND
+                    : IsSExt        ? ISD::SIGN_EXTEND
+                                    : ISD::ZERO_EXTEND;
----------------
hazzlim wrote:

Ah yep good point - have added the brackets to improve readability (plus the re-formatting from clang-format).

Thank you for reviewing!

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


More information about the llvm-commits mailing list