[PATCH] D75878: [SLP] Support vectorizing functions provided by vector libs.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 15:40:18 PDT 2020
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3247
+
+ VFShape Shape =
+ VFShape::get(*CI, {static_cast<unsigned>(VecTy->getNumElements()), false},
----------------
`auto Shape`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3255
+ SmallVector<Type *, 4> VecTys;
+ for (unsigned op = 0, opc = CI->getNumArgOperands(); op != opc; ++op)
+ VecTys.push_back(VectorType::get(CI->getArgOperand(op)->getType(),
----------------
Better to use ranged-based for, if possible. Otherwise, capitalize `op` and `opc` variables, `Op` and `OpC` or `Opc`.
================
Comment at: llvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -slp-vectorizer -vector-library=Accelerate -S %s | FileCheck %s
----------------
Would be good to precommit the test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75878/new/
https://reviews.llvm.org/D75878
More information about the llvm-commits
mailing list