llvm-project/llvm/test/Analysis/LoopCacheAnalysis
Congzhe Cao 05ccde8023 [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
2022-07-21 01:57:05 -04:00
..
PowerPC [LoopCacheAnalysis] Fix a type mismatch problem in cost calculation 2022-07-21 01:57:05 -04:00
compute-cost.ll [LoopCacheAnalysis] Fix a type mismatch problem in cost calculation 2022-07-21 01:57:05 -04:00