[PATCH] D131093: [LV] Restructure isPredicatedInst and isScalarWithPredication (w/a fix for uniform mem ops)

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 00:51:07 PDT 2022


david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1438
 
-  /// Returns true if \p I is an instruction that will be scalarized with
-  /// predication when vectorizing \p I with vectorization factor \p VF. Such
-  /// instructions include conditional stores and instructions that may divide
-  /// by zero.
+  /// Returns true if \p I is an instrcution which requires predication and
+  /// for which our chosen predication strategy is scalarization (i.e. we
----------------
nit: I think it should be 'instruction'


================
Comment at: llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll:585
 ;
 ; TF-SCALABLE-LABEL: @uniform_load_unaligned(
 ; TF-SCALABLE-NEXT:  entry:
----------------
I tried vectorising these tests with SVE (`opt -loop-vectorize -mattr=+sve -mtriple=aarch64-linux-gnu < ../llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll -S`) and it already works today without this patch. In fact it works both and without tail-folding enabled. Do you know why RISC-V is different to SVE and why this patch is needed to vectorise?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131093



More information about the llvm-commits mailing list