[PATCH] D98506: [SVE][LoopVectorize] Verify support for vectorizing loops with invariant loads

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 02:19:19 PDT 2021


CarolineConcatto added a comment.

Hey Kerry,

Last time @david-arm asked me to test something like this with the reverse vector:

  if (cond[i])
   a[i] = b[i] + b[42];

Is it valid to do the same here?



================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-inv-loads.ll:2
+; RUN: opt -S -loop-vectorize -mattr=+sve -mtriple aarch64 < %s | FileCheck %s
+
+define void @invariant_load(i64 %n, i32* noalias nocapture %a, i32* nocapture readonly %b) {
----------------
Should we add this:

; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t

; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it.$
; WARN-NOT: warning

too?


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-inv-loads.ll:7
+; CHECK: %[[GEP:.*]] = getelementptr inbounds i32, i32* %b, i64 42
+; CHECK: %[[INVLOAD:.*]] = load i32, i32* %[[GEP]]
+; CHECK: %[[SPLATINS:.*]] = insertelement <vscale x 4 x i32> poison, i32 %[[INVLOAD]], i32 0
----------------
Just in case...could any of these be CHECK-NEXT?
I believe the test gets stronger when we use CHECK-NEXT if possible.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98506



More information about the llvm-commits mailing list