[llvm] [SelectionDAG] Fix D66309: Allow unordered atomics to have some optimizations done for them (PR #85589)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 17 23:46:36 PDT 2024


================
@@ -21125,10 +21123,9 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) {
   if (SDValue NewST = replaceStoreOfInsertLoad(ST))
     return NewST;
 
-  // TODO: Can relax for unordered atomics (see D66309)
   if (StoreSDNode *ST1 = dyn_cast<StoreSDNode>(Chain)) {
-    if (ST->isUnindexed() && ST->isSimple() &&
-        ST1->isUnindexed() && ST1->isSimple()) {
+    if (ST->isUnindexed() && ST->isUnordered() && ST1->isUnindexed() &&
+        ST1->isUnordered()) {
----------------
arsenm wrote:

This is untested 

https://github.com/llvm/llvm-project/pull/85589


More information about the llvm-commits mailing list