Skip to content

Commit 79f2f2f

Browse files
committed
!fixup restore changes to address comments
1 parent ce9186b commit 79f2f2f

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
@@ -170,11 +170,11 @@ static bool isDereferenceableAndAlignedPointer(
170170

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

0 commit comments

Comments
 (0)