[PATCH] D66318: [SDAG] Update generic code to conservatively check for isAtomic in addition to isVolatile
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 15:13:14 PDT 2019
arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: wdng.
LGTM with nits
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14036
StoreSDNode *ST = dyn_cast<StoreSDNode>(Chain.getNode());
- if (!ST || ST->isVolatile())
+ // TODO: relax this restriction for unordered atomics (see D66309)
+ if (!ST || !ST->isSimple())
----------------
Capitalize comment
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16320
// is dead/noop.
+ // TODO: can relax for unordered atomics (see D66309)
if (LoadSDNode *Ld = dyn_cast<LoadSDNode>(Value)) {
----------------
Ditto
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16332
+ // TODO: can relax for unordered atomics (see D66309)
if (StoreSDNode *ST1 = dyn_cast<StoreSDNode>(Chain)) {
----------------
Ditto
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16464
StoreSDNode *ST = dyn_cast<StoreSDNode>(Chain);
- if (ST->isVolatile() || ST->isIndexed())
+ // TODO: can relax for unordered atomics (see D66309)
+ if (!ST->isSimple() || ST->isIndexed())
----------------
Ditto
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66318/new/
https://reviews.llvm.org/D66318
More information about the llvm-commits
mailing list