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

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 10:05:38 PST 2019


jfb added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:90
+    RMWI.setOperation(AtomicRMWInst::FAdd);
+    RMWI.setOperand(1, ConstantFP::getNegativeZero(RMWI.getType()));
+    return &RMWI;
----------------
reames wrote:
> jfb wrote:
> > 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.
> Can do so, but do you mind if I do that in a separate change just for risk reduction?
Totally fine by me.


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

https://reviews.llvm.org/D58251





More information about the llvm-commits mailing list