[PATCH] D58251: Extend "idempotent" atomicrmw optimizations to floating point
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 21 09:41:48 PST 2019
reames marked 2 inline comments as done.
reames added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:33
+ return false;
+ };
+
----------------
jfb wrote:
> @scanon for comment.
@scanon ping on the FP question only
================
Comment at: lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp:90
+ RMWI.setOperation(AtomicRMWInst::FAdd);
+ RMWI.setOperand(1, ConstantFP::getNegativeZero(RMWI.getType()));
+ return &RMWI;
----------------
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?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58251/new/
https://reviews.llvm.org/D58251
More information about the llvm-commits
mailing list