aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorCongzhe Cao <congzhe.cao@huawei.com>2022-07-21 01:35:58 -0400
committerCongzheUalberta <congzhecao@gmail.com>2022-07-21 01:57:05 -0400
commit05ccde8023a6176927454f478730d29e53104c05 (patch)
tree0840e81077e3549e0fe8e566a82daf8727973b8f /llvm/lib/Transforms/Utils/Local.cpp
parent61fa7a88c7b6360222d4107e938529f2dccc1176 (diff)
downloadllvm-05ccde8023a6176927454f478730d29e53104c05.zip
llvm-05ccde8023a6176927454f478730d29e53104c05.tar.gz
llvm-05ccde8023a6176927454f478730d29e53104c05.tar.bz2
[LoopCacheAnalysis] Fix a type mismatch problem in cost calculation
There is a problem in loop cache analysis that the types of SCEV variables `Coeff` and `ElemSize` in function `isConsecutive()` may not match. The mismatch would cause SCEV failures when `Coeff` is multiplied with `ElemSize`. The fix in this patch is to extend the type of both `Coeff` and `ElemSize` to whichever is wider in those two variables. As a clean-up, duplicate calculations of `Stride` in `computeRefCost()` is then removed. Reviewed By: Meinersbur, #loopoptwg Differential Revision: https://reviews.llvm.org/D128877
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions