[llvm] [DA] Fix crash when two loops have different type sizes of becount (PR #165021)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 25 14:03:23 PDT 2025
================
@@ -1131,9 +1131,18 @@ bool DependenceInfo::haveSameSD(const Loop *SrcLoop,
if (SE->hasLoopInvariantBackedgeTakenCount(DstLoop))
DstUP = SE->getBackedgeTakenCount(DstLoop);
- if (SrcUB != nullptr && DstUP != nullptr &&
- SE->isKnownPredicate(ICmpInst::ICMP_EQ, SrcUB, DstUP))
- return true;
+ if (SrcUB != nullptr && DstUP != nullptr) {
+ unsigned SrcBitWidth = SE->getTypeSizeInBits(SrcUB->getType());
----------------
fhahn wrote:
Could use `SE.getWiderType`/`getNoopOrZeroExtend`
https://github.com/llvm/llvm-project/pull/165021
More information about the llvm-commits
mailing list