Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions llvm/lib/Analysis/BasicAliasAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL,
if (Decomposed.VarIndices[i].Val.V == LE.Val.V &&
Decomposed.VarIndices[i].Val.hasSameCastsAs(LE.Val)) {
Scale += Decomposed.VarIndices[i].Scale;
LE.IsNSW = false; // We cannot guarantee nsw for the merge.
Decomposed.VarIndices.erase(Decomposed.VarIndices.begin() + i);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/pr69096.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
target datalayout = "p:64:64:64"

; CHECK-LABEL: Function: pr69096
; FIXME: This should be MayAlias. %p == %scevgep.i when %a == -1.
; CHECK: NoAlias: i8* %p, i16* %scevgep.i
; %p == %scevgep.i when %a == -1.
; CHECK: MayAlias: i8* %p, i16* %scevgep.i

define i32 @pr69096(i16 %a, ptr %p) {
entry:
Expand Down