]> granicus.if.org Git - llvm/commitdiff
[DAGCombine] LoadedSlice - keep getOffsetFromBase() uint64_t offset. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 9 Jul 2019 15:28:57 +0000 (15:28 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 9 Jul 2019 15:28:57 +0000 (15:28 +0000)
Keep the uint64_t type from getOffsetFromBase() to stop truncation/extension overflow warnings in MSVC in alignment math.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365504 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 96164f3d980bdae64e7ddffb838e6420a2f662ba..cd5de4c1400411e0c27c8dc8c2a5bbf9cfdeedb8 100644 (file)
@@ -14364,7 +14364,7 @@ struct LoadedSlice {
   /// Get the alignment of the load used for this slice.
   unsigned getAlignment() const {
     unsigned Alignment = Origin->getAlignment();
-    unsigned Offset = getOffsetFromBase();
+    uint64_t Offset = getOffsetFromBase();
     if (Offset != 0)
       Alignment = MinAlign(Alignment, Alignment + Offset);
     return Alignment;