[PATCH] D70192: [LoopCacheAnalysis]: Fix assertion failure during cost computation

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 11:46:00 PST 2019


bmahjour added inline comments.
Herald added a subscriber: wuzish.


================
Comment at: llvm/lib/Analysis/LoopCacheAnalysis.cpp:286
     const SCEV *CacheLineSize = SE.getConstant(Stride->getType(), CLS);
+    Type *WiderType = SE.getWiderType(Stride->getType(), TripCount->getType());
+    Stride = SE.getNoopOrAnyExtend(Stride, WiderType);
----------------
const Type *WiderType?


================
Comment at: llvm/test/Analysis/LoopCacheAnalysis/PowerPC/compute-cost.ll:2
+; RUN: opt < %s -passes='print<loop-cache-cost>' -disable-output 2>&1 | FileCheck %s
+
+target datalayout = "e-m:e-i64:64-n32:64"
----------------
A comment saying what the test is testing would be useful.


================
Comment at: llvm/test/Analysis/LoopCacheAnalysis/PowerPC/compute-cost.ll:10
+
+define dso_local void @handle_to_ptr(%struct._Handleitem** nocapture %blocks) local_unnamed_addr {
+; Preheader:
----------------
are dso_local, nocapture, local_unnamed_addr necessary?


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

https://reviews.llvm.org/D70192





More information about the llvm-commits mailing list