[PATCH] D121199: [RISCV] Don't enable loop vectorizer interleaving if the V extension is scalable

Liao Chunyu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 02:07:16 PST 2022


liaolucy created this revision.
liaolucy added reviewers: craig.topper, frasercrmck, luke957.
Herald added subscribers: VincentWu, achieveartificialintelligence, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
Herald added a project: All.
liaolucy requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Possible scalable vectorization does not require unroll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121199

Files:
  llvm/lib/Target/RISCV/RISCVSubtarget.h


Index: llvm/lib/Target/RISCV/RISCVSubtarget.h
===================================================================
--- llvm/lib/Target/RISCV/RISCVSubtarget.h
+++ llvm/lib/Target/RISCV/RISCVSubtarget.h
@@ -223,7 +223,7 @@
   // F16 and F64 both require F32.
   bool hasVInstructionsAnyF() const { return hasVInstructionsF32(); }
   unsigned getMaxInterleaveFactor() const {
-    return hasVInstructions() ? MaxInterleaveFactor : 1;
+    return useRVVForFixedLengthVectors() ? MaxInterleaveFactor : 1;
   }
 
 protected:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121199.413740.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220308/33797964/attachment.bin>


More information about the llvm-commits mailing list