[llvm] [ValueTracking] Conservative nosync check prevents vectorization (PR #181345)

Kshitij Paranjape via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 13 12:31:31 PST 2026


================
@@ -0,0 +1,133 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt %s -O3 -debug-only=loop-vectorize -S | FileCheck %s
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+ at ptr = local_unnamed_addr global ptr null, align 8
+
+; Function Attrs: mustprogress norecurse nounwind ssp memory(read, inaccessiblemem: write, target_mem0: none, target_mem1: none) uwtable(sync)
+define i64 @notVectorizingTest(ptr noundef nonnull readonly align 8 captures(none) dereferenceable(24) %v, i32 noundef %n) local_unnamed_addr #0 {
----------------
kshitijvp wrote:

I have added tests for the same containing fence, volatile, atomic instructions.

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


More information about the llvm-commits mailing list