[PATCH] D128877: [LoopCacheAnalysis] Fix a type mismatch bug in cost calculation
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 08:20:48 PDT 2022
Meinersbur added a comment.
I don't think we can rely on `isKnownNegative`
1. The SCEV might be sometimes negative, sometime positive, depending on some runtime value (e.g. stride is multiplied by a function argument). This is, if `isKnownPositive` and `isKnownNegative` both return false, we'd need to bail out.
2. `isKnownNegative` already assumes that the integer is signed. With that assumption, `sext` would always be correct (which is equivalent to zext for positive integers)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128877/new/
https://reviews.llvm.org/D128877
More information about the llvm-commits
mailing list