[PATCH] D155520: [LV] Complete load groups and release store groups in presence of dependency
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 3 15:17:20 PDT 2023
Ayal added a comment.
In D155520#4544942 <https://reviews.llvm.org/D155520#4544942>, @Ayal wrote:
> ...
> Having `Dependences.size()` surpass `MaxDependences` calls for an extensive testcase, given the latter defaults to 100.
> An alternative is to reduce this threshold by setting `max-dependences` thereby helping to produce a simpler minimal testcase.
The extensive test reproducer depends on current default value of MaxDependences.
How about also adding a minimal testcase such as something like:
; RUN: opt -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1 -enable-interleaved-mem-accesses=true --max-dependences=0 -S %s | FileCheck %s
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
define void @three_interleaved_stores(ptr %arr) {
; CHECK-LABEL: define void @three_interleaved_stores
; CHECK: store <12 x i8>
entry:
br label %loop
loop:
%i = phi i64 [ 0, %entry ], [ %i.next, %loop ]
%i.plus.1 = add nuw nsw i64 %i, 1
%i.plus.2 = add nuw nsw i64 %i, 2
%gep.i.plus.0 = getelementptr inbounds i8, ptr %arr, i64 %i
%gep.i.plus.1 = getelementptr inbounds i8, ptr %arr, i64 %i.plus.1
%gep.i.plus.2 = getelementptr inbounds i8, ptr %arr, i64 %i.plus.2
store i8 1, ptr %gep.i.plus.0
store i8 1, ptr %gep.i.plus.1
store i8 1, ptr %gep.i.plus.2
%i.next = add nuw nsw i64 %i, 3
%icmp = icmp ugt i64 %i, 1032
br i1 %icmp, label %exit, label %loop
exit:
ret void
}
================
Comment at: llvm/test/Transforms/LoopVectorize/interleaved-accesses-use-after-free.ll:27
+; CHECK: Too many dependences, stopped recording
+; If too many dependences are recorded, LoopAccessAnalysis just conservatively
+; returns true for any pair of instructions compared (even those belonging to
----------------
================
Comment at: llvm/test/Transforms/LoopVectorize/interleaved-accesses-use-after-free.ll:30-31
+; the same store group). This tests make sure that we do not incorrectly release
+; a store group which had no dependences between its members, even if we have
+; too many dependences recorded.
+
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155520/new/
https://reviews.llvm.org/D155520
More information about the llvm-commits
mailing list