[llvm] [LV] Simple Linear Recurrence Vectorization (PR #219440)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 06:18:17 PDT 2026


================
@@ -0,0 +1,158 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -passes=loop-vectorize -enable-linear-recurrence-vectorization -force-vector-width=4 -force-vector-interleave=1 -S %s | FileCheck %s
+
+target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-linux-gnu"
+
+; https://github.com/llvm/llvm-project/issues/56999
+define i32 @rabin_karp(ptr %s, i64 %n) {
----------------
artagnon wrote:

I think the motivating use-case of optimizing a Rabin-Karp hash is probably better handled by HashRecognize? It currently optimizes cyclic-redundancy-checks, but it should be relatively easy to extend it to recognize Rabin-Karp, and optimize it in LoopIdiom?

https://github.com/llvm/llvm-project/pull/219440


More information about the llvm-commits mailing list