[PATCH] D58251: Extend "idempotent" atomicrmw optimizations to floating point

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 13:23:04 PST 2019


jfb added a subscriber: scanon.
jfb added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:33
+      return false;
+    };
+
----------------
@scanon for comment.


================
Comment at: lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:90
+    RMWI.setOperation(AtomicRMWInst::FAdd);
+    RMWI.setOperand(1, ConstantFP::getNegativeZero(RMWI.getType()));
+    return &RMWI;
----------------
I think you want to canonicalize to integer or with zero a well, and have casts. It's still just a load at the end of the day.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58251/new/

https://reviews.llvm.org/D58251





More information about the llvm-commits mailing list