[PATCH] D147151: [NFC][LoopVectorize] Add zext/sext cost tests when there is type shrinkage

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 04:10:11 PDT 2023


fhahn added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/type-shrinkage-zext-costs.ll:3
+; RUN: opt -S -passes=loop-vectorize,instsimplify -force-vector-interleave=1 \
+; RUN:   -debug-only=loop-vectorize 2>%t < %s | FileCheck %s
+; RUN: cat %t | FileCheck %s --check-prefix=CHECK-COST
----------------
I think this needs `; REQUIRES: asserts`, to make sure this only runs when `-debug-only` is available.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/type-shrinkage-zext-costs.ll:78
+  %cmp8 = icmp sgt i32 %len, 0
+  br i1 %cmp8, label %for.body, label %for.cond.cleanup
+
----------------
this check shouldn't be needed?


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/type-shrinkage-zext-costs.ll:80
+
+for.cond.cleanup:                                 ; preds = %for.body, %entry
+  ret void
----------------
might be better called `exit` and move to end. Same as below.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/type-shrinkage-zext-costs.ll:168
+  %cmp8 = icmp sgt i32 %len, 0
+  br i1 %cmp8, label %for.body, label %for.cond.cleanup
+
----------------
this check shouldn't be needed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147151



More information about the llvm-commits mailing list