For internal functions, globals-aa returns different ModRefInfo
results if they are inlined and are no longer called by external
functions. This causes an assertion failure when cloning memoryssa
accesses.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| llvm/lib/Analysis/MemorySSA.cpp | ||
|---|---|---|
| 1764 | We could do something like assert(Def == DefCheck || !DefCheck), to check that we only reduce, but not increase possible accesses. (Though I suspect that we'll hit cases like that as well...) | |
| llvm/test/Transforms/SimpleLoopUnswitch/pr59546.ll | ||
| 42 | Is this needed to prevent inlining? Can we mark it noinline instead? | |
| llvm/lib/Analysis/MemorySSA.cpp | ||
|---|---|---|
| 1764 | +1 to add this check now. | |
LG
| llvm/lib/Analysis/MemorySSA.cpp | ||
|---|---|---|
| 1764 | Can you please add () around the expression? I think it still does the right thing in the end, but mostly by accident. It will evaluate Def == DefCheck || (!DefCheck && "") | |
We could do something like assert(Def == DefCheck || !DefCheck), to check that we only reduce, but not increase possible accesses. (Though I suspect that we'll hit cases like that as well...)