[PATCH] D96356: [SVE][LoopVectorize] Support for vectorization of loops with function calls
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 05:59:53 PST 2021
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4930
Type *TysForDecl[] = {CI->getType()};
if (VF.isVector()) {
TysForDecl[0] = VectorType::get(CI->getType()->getScalarType(), VF);
----------------
nit: I think we can remove the braces now.
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/scalable-call.ll:2
+; RUN: opt -S -loop-vectorize -instcombine -mattr=+sve -mtriple aarch64-unknown-linux-gnu < %s | FileCheck %s
+
+define void @vec_load(i64 %N, double* nocapture %a, double* nocapture readonly %b) {
----------------
Is it worth adding tests for LLVM intrinsics too that use fast math, i.e. test/Transforms/LoopVectorize/PowerPC/widened-massv-vfabi-attr.ll has an example like this:
``` %1 = call fast double @llvm.sin.f64(double %conv) #1
%add = fadd fast double %Sum.0, %1
...
declare double @llvm.sin.f64(double) #0
declare <2 x double> @__sind2_massv(<2 x double>) #0
attributes #0 = { nounwind readnone speculatable willreturn }
attributes #1 = { "vector-function-abi-variant"="_ZGV_LLVM_N2v_llvm.sin.f64(__sind2_massv)" }
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96356/new/
https://reviews.llvm.org/D96356
More information about the llvm-commits
mailing list