[PATCH] D93503: [GVN] Propagate llvm.access.group metadata of loads
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 07:06:10 PST 2021
fhahn added a comment.
This seems reasonable to me, as we should only reduce the number of loads executed during PRE. If they are in the same loop, the metadata should stay valid, as we do not access any additional locations.
Would it be possible to add a simple test case where we move a load from a sub-loop into a parent loop?
================
Comment at: llvm/test/Transforms/GVN/PRE/load-pre-metadata-accsess-group.ll:8
+ %idxprom = sext i32 %0 to i64
+ %arrayidx = getelementptr inbounds i32, i32* %ee, i64 %idxprom
+ %1 = load i32, i32* %arrayidx, align 4
----------------
can you simplify the test to only the required instructions? e.g. not all access here should be needed, nor all parameters, nor all arithmetic instructions, etc
Once it is cut down, it would probably be good to explicitly match the blocks that were inserted as part of GVN PRE.
Also, do we need the dedicated preheader/exit blocks?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93503/new/
https://reviews.llvm.org/D93503
More information about the llvm-commits
mailing list