[PATCH] D15397: [EarlyCSE] DSE of stores which write back loaded values

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 23:53:43 PST 2015


jfb added a comment.

In http://reviews.llvm.org/D15397#307728, @reames wrote:

> In http://reviews.llvm.org/D15397#307456, @jfb wrote:
>
> > Technically you could even remove `seq_cst` load/store pairs if they're not synchronizing with anything in the middle. You'd still have to preserve the effect with a fence, but the access is dead since it must have raced if it didn't synchronize with anything else.
>
>
> Not going to argue this.  I don't care to optimize this case and reasoning about it in enough detail to agree or disagree is more investment than I want to make right now.


Sounds good.

> > Just to confirm (even though this optimization happens elsewhere): we don't care about memory accesses which normalize FP values, e.g. canonicalizing NaNs or flushing denormals to zero?

> 

> 

> Hm.  Good question.  I don't know the answer to this.  In practice, we side step the question by not allowing atomic stores of floating point at all - the verifier will reject - but given I'm planning on changing that soon, that's an interesting question.


Dead non-atomic FP stores get eliminated, so I'm assuming this is fine.


http://reviews.llvm.org/D15397





More information about the llvm-commits mailing list