[PATCH] D28126: [MemDep] Handle gep with zeros for invariant.group
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 30 01:05:36 PST 2016
Prazek added inline comments.
================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:392
+ // U = getelementptr Ptr, 0, 0...
+ if (auto *GEP = dyn_cast<GetElementPtrInst>(U)) {
+ if (GEP->hasAllZeroIndices()) {
----------------
reames wrote:
> minor: remove brackets for single statement ifs.
sure
================
Comment at: test/Transforms/GVN/invariant.group.ll:323
+; CHECK-LABEL: define void @_Z5testGv() {
+define void @_Z5testGv() {
+ %a = alloca %struct.A, align 8
----------------
reames wrote:
> you need a few more check statements here. As written, I'm not sure what this test is testing by just reading it.
>
> Also, can you strip away any of this?
Strip away what?
Test checks if invariant.group works also on zero geps (%2).
You are right, I need at least check of
call void @_ZN1A3fooEv(%struct.A* nonnull dereferenceable(8) %a)
https://reviews.llvm.org/D28126
More information about the llvm-commits
mailing list