[llvm] [LoopVectorize] Add tests for reverse early-exit loops in deref regions (PR #228062)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 05:15:00 PDT 2026


================
@@ -0,0 +1,102 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --filter-out-after "scalar.ph:" --version 6
+; RUN: opt -p loop-vectorize -force-vector-width=4 -S %s | FileCheck %s
+
+; The loops below walk a dereferenceable region backwards, so every load is
+; safe.
+
+; TODO: The counting-down IV accesses [0, %length), which is exactly the region
----------------
fhahn wrote:

```suggestion
; TODO: The counting-down IV is in the range [0, %length), which is exactly the region
```

nit: the IV itself does not access anything

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


More information about the llvm-commits mailing list