[PATCH] D86432: [SVE] Fix TypeSize related warnings with IR truncates of scalable vectors

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 06:38:07 PDT 2020


fpetrogalli accepted this revision.
fpetrogalli added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:456
+      if (!DstSize.isScalable() && DL.isLegalInteger(DstSize.getFixedSize()))
         return 0;
       break;
----------------
david-arm wrote:
> fpetrogalli wrote:
> > How comes that the test that uses scalable vectors on `trunc` is reporting zero? afaict, if we enter this methods with `trunc of scalable vectors` the cost reported by the function should be 1, no?
> Hi, the cost is actually then recalculated in BasicTTIImpl::getCastInstrCost if the cost != 0.
Thank you for explaining. LGTM!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86432



More information about the llvm-commits mailing list