Skip to content

Commit e90d0fa

Browse files
committed
!fixup restore changes to address comments
1 parent 4dbce03 commit e90d0fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/Loads.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ static bool isDereferenceableAndAlignedPointer(
173173

174174
if (CtxI) {
175175
/// Look through assumes to see if both dereferencability and alignment can
176-
/// be provent by an assume if needed.
176+
/// be proven by an assume if needed.
177177
RetainedKnowledge AlignRK;
178178
RetainedKnowledge DerefRK;
179179
APInt Offset(DL.getTypeStoreSizeInBits(V->getType()), 0);
180-
bool IsAligned = isAligned(V, Offset, Alignment, DL);
180+
bool IsAligned = V->getPointerAlignment(DL) >= Alignment;
181181
if (getKnowledgeForValue(
182182
V, {Attribute::Dereferenceable, Attribute::Alignment}, AC,
183183
[&](RetainedKnowledge RK, Instruction *Assume, auto) {

0 commit comments

Comments
 (0)