[PATCH] D138899: [DAGCombiner] handle more store value forwarding
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 17:53:50 PST 2022
shchenz marked 2 inline comments as done.
shchenz added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17107
+ if (!Store)
+ continue;
+ BaseIndexOffset BasePtrLD = BaseIndexOffset::match(LD, DAG);
----------------
RolandF wrote:
> If we can't make the assumption that token factor operands are unaliased, I think that the non-store path needs to be checked more strongly. There are ways to touch memory besides stores. I would suggest to whitelist the kinds of operands we know are safe and to otherwise give up.
In the below `GatherAllAliases()`, it will collect all nodes in the `TokenFactor`(not limited to store) that are aliased to the candidate Store. If any nodes found except the candidate store itself, we will give up. That sounds like enough, what do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138899/new/
https://reviews.llvm.org/D138899
More information about the llvm-commits
mailing list