[llvm] r365504 - [DAGCombine] LoadedSlice - keep getOffsetFromBase() uint64_t offset. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 08:28:57 PDT 2019
Author: rksimon
Date: Tue Jul 9 08:28:57 2019
New Revision: 365504
URL: http://llvm.org/viewvc/llvm-project?rev=365504&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=365504&r1=365503&r2=365504&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Jul 9 08:28:57 2019
@@ -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;
More information about the llvm-commits
mailing list