From 8d9c5e8ad87c3274c6546008c1bca9c05fade0d8 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 9 Jul 2019 15:28:57 +0000 Subject: [PATCH] [DAGCombine] LoadedSlice - keep getOffsetFromBase() uint64_t offset. NFCI. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 96164f3d980..cd5de4c1400 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -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; -- 2.40.0