Skip to content

Commit 80ff42b

Browse files
committed
[scev-aa] Make TypeSize -> uint64_t conversion explicit
Some versions of MSVC have issues with the implicit conversion, and it also makes it clearer what's going on (the current code doesn't handle scalable vectors)
1 parent 0c6759b commit 80ff42b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ AliasResult SCEVAAResult::alias(const MemoryLocation &LocA,
5555
if (canComputePointerDiff(SE, AS, BS)) {
5656
unsigned BitWidth = SE.getTypeSizeInBits(AS->getType());
5757
APInt ASizeInt(BitWidth, LocA.Size.hasValue()
58-
? LocA.Size.getValue()
58+
? static_cast<uint64_t>(LocA.Size.getValue())
5959
: MemoryLocation::UnknownSize);
6060
APInt BSizeInt(BitWidth, LocB.Size.hasValue()
61-
? LocB.Size.getValue()
61+
? static_cast<uint64_t>(LocB.Size.getValue())
6262
: MemoryLocation::UnknownSize);
6363

6464
// Compute the difference between the two pointers.

0 commit comments

Comments
 (0)