[PATCH] D147720: [LV] Use the known trip count when costing non-tail folded VFs

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 07:58:07 PDT 2023


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/smallest-and-widest-types.ll:98
   %inc = add nuw nsw i8 %i.08, 1
-  %exitcond.not = icmp eq i8 %inc, 12345
+  %exitcond.not = icmp eq i8 %inc, 241
   br i1 %exitcond.not, label %for.end, label %for.body
----------------
dmgreen wrote:
> sdesmalen wrote:
> > I'm curious why this test needed changing. What VF does it pick with 12345?
> 12345 as a i8 is really 57, which was too many scalar iterations to pick v16 over v8. It is `3*vf16 + 9*vf1` vs `7*vf8 + 1*vf1`.
> 
> I've changed it to 241 so that it keeps testing the same thing. And is a i8 value.
Ha, I didn't spot it said `i8 12345`, that's silly. Your explanation makes sense, thanks for clarifying!


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

https://reviews.llvm.org/D147720



More information about the llvm-commits mailing list