[all-commits] [llvm/llvm-project] 2e6deb: [LoopInterchange] Fix overflow in cost calculation...
Sjoerd Meijer via All-commits
all-commits at lists.llvm.org
Thu Nov 14 00:41:07 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e6deb1dd3a4422807633ba08773e8d786e43d4c
https://github.com/llvm/llvm-project/commit/2e6deb1dd3a4422807633ba08773e8d786e43d4c
Author: Sjoerd Meijer <smeijer at nvidia.com>
Date: 2024-11-14 (Thu, 14 Nov 2024)
Changed paths:
M llvm/include/llvm/Analysis/LoopCacheAnalysis.h
M llvm/lib/Analysis/LoopCacheAnalysis.cpp
A llvm/test/Analysis/LoopCacheAnalysis/interchange-refcost-overflow.ll
Log Message:
-----------
[LoopInterchange] Fix overflow in cost calculation (#111807)
If the iteration count is really large, e.g. UINT_MAX, then the cost
calculation can overflows and trigger an assert. So saturate the cost to
INT_MAX if this is the case by using InstructionCost as a type which
already supports this kind of overflow handling.
This fixes #104761
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list