[PATCH] D24745: TLI: Add option to generate dependent stores in scalarization.

Jan Vesely via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 16:52:09 PDT 2016


jvesely abandoned this revision.
jvesely added a comment.

In https://reviews.llvm.org/D24745#552857, @hfinkel wrote:

> In https://reviews.llvm.org/D24745#552833, @jvesely wrote:
>
> > In https://reviews.llvm.org/D24745#552401, @hfinkel wrote:
> >
> > > I don't understand why you need this (even if you end up lowing the individual stores using a RMW sequence). Can you please explain?
> >
> >
> > the problem is if we use RMW sequence for two different elements of the same word. for example storing bytes at address A and A +1. let's assume that A is 4byte aligned. the generated code will look like this
> >  1: r1 = LOAD A
> >  2: r2 = {r1[8:31], x} //This is a sequence of AND/OR instructions that masks of the old bits and ORs the new ones
> >  3: STORE A, r2
> >  4: r3 = LOAD A
> >  5: r4 ={r3[0:8],y,r3[15:31]} //This is a sequence of AND/OR instructions that masks of the old bits and ORs the new ones
> >  6: STORE A, r4
> >
> > The original code does not have dependency between 3 and 4.
>
>
> Why not? I understand why the truncated stores and extending loads might be independent, but if you have code that widens those without looking at potential aliased peers and adjusting the chain, I think the problem lies there.


OK. I guess I'll need to look into how to do that then.


Repository:
  rL LLVM

https://reviews.llvm.org/D24745





More information about the llvm-commits mailing list