[PATCH] D91833: [SelectionDAG] Avoid aliasing analysis if the object size is unknown.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 23:07:01 PST 2020
HsiangKai added inline comments.
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp:103
+ // vector objects on the stack.
+ if (*NumBytes0 == static_cast<int64_t>(MemoryLocation::UnknownSize) ||
+ *NumBytes1 == static_cast<int64_t>(MemoryLocation::UnknownSize))
> niravd wrote:
> > HsiangKai wrote:
> > > niravd wrote:
> > > > This is too aggressive. We can still determine that a two addresses are non-aliasing even if one is unknown size. (e.g. FrameIndex vs. Global)
> > > The checking is under the condition that BasePtr0.equalBaseIndex(BasePtr1, ...) equals true. It would not be the case you considered.
> > What about the case where equalBaseIndex returns true, and the lowered addressed access has a known size smaller than the difference? In that case, we should be able to determine that they are do not alias.
> I doubt there is a such scenario to share the same base between fixed and scalable types. I could add an assertion here.
I could not exclude the case that one fixed object is fixed length type and another fixed object is scalable vector type. Sorry for that. I will update the patch.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the llvm-commits