[PATCH] D93129: [LV] Do not use vector type to compute cost of scalar address comp.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 05:10:52 PST 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6550
   // Get the cost of the scalar memory instruction and address computation.
-  unsigned Cost =
-      VF.getKnownMinValue() * TTI.getAddressComputationCost(PtrTy, SE, PtrSCEV);
+  unsigned Cost = VF.getKnownMinValue() *
+                  TTI.getAddressComputationCost(Ptr->getType(), SE, PtrSCEV);
----------------
drive-by nit: `VF.getFixedValue()`, since this function only makes sense for fixed-width vectors.
(same for some other places in this function, not necessarily caused by this patch)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93129



More information about the llvm-commits mailing list