[PATCH] D154173: [LAA] Add test that shows MaxSafeDepDistBytes is incorrect. NFC.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 07:29:46 PDT 2023


fhahn added inline comments.


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll:28
+entry:
+  %cmp18 = icmp sgt i32 %len, 0
+  %0 = zext i32 %len to i64
----------------
is this needed?


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll:29
+  %cmp18 = icmp sgt i32 %len, 0
+  %0 = zext i32 %len to i64
+  br i1 %cmp18, label %for.body, label %for.cond.exit
----------------
simpler to pass `%len` as i64


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll:32
+
+for.body:
+  %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
----------------
nit: can simply be `loop`


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll:33
+for.body:
+  %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
+  %1 = add nuw nsw i64 %indvars.iv, 4
----------------
nit: strip `indvars.`


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll:34
+  %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
+  %1 = add nuw nsw i64 %indvars.iv, 4
+  %arrayidx = getelementptr inbounds i32, ptr %a, i64 %1
----------------
maybe easier to read if this would be `%iv.4`, same for the other increments


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll:49
+
+for.cond.exit:
+  ret void
----------------
nit: can simply be `exit`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154173/new/

https://reviews.llvm.org/D154173



More information about the llvm-commits mailing list