[PATCH] D131548: [AArch64]Remove svget/svset/svcreate from llvm

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 03:46:45 PDT 2022


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2417
     // vectors.
     if (DstTy && VecTy) {
       unsigned DstNumElts = DstTy->getNumElements();
----------------
DstTy and VecTy are misnomers, because these are only non-nullptr for FixedWidthVectors, whereas the code you added works for both ScalableVectors and FixedWidthVectors.
Can you change this code to be:

  if (auto *FVTy = dyn_cast<FixedVectorType>(Vec->getType())) {
    if (auto *DstFVTy = dyn_cast<FixedVectorType>(II->getType())) {
      ...
    }
  }



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2437
+
+    // (extract_vector (insert_vector InsertTuple, InsertValue, InsertIdx), ExtractIdx)
+    unsigned ExtractIdx = cast<ConstantInt>(Idx)->getZExtValue();
----------------
Should this combine happen before the combine above?


================
Comment at: llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-tuple-extract.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=instcombine < %s | FileCheck %s
----------------
Does this test really need to be AArch64/SVE specific? Or can it live in llvm/test/Transforms/InstCombine ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131548/new/

https://reviews.llvm.org/D131548



More information about the llvm-commits mailing list