[llvm-dev] LSR

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 10 19:53:03 PDT 2017


On 04/10/2017 08:47 AM, Jonas Paulsson via llvm-dev wrote:
> Hi,
>
> I find that LSR is not helping enough on avoiding unfoldable offsets 
> for SystemZ. When the loop has three stores with unfoldable offsets, 
> LSR rewrites the IV in a good way. However, if adding another store 
> with a foldable offset that fits already, LSR fails to rewrite the 
> three stores.
>
> And if I happen to add a too big *positive* offset (the first three 
> were negative) instead of a foldable one, only the positive gets 
> transformed.
>
> * LSR is not rewriting the IV to have three foldable offsets rather 
> than one.
>
> * It would actually be preferred in this case to use a second address 
> register for the offset that is too far away from the others.
>
> Has anyone any idea on how to best handle this? Can LSR "split" an IV 
> to use an extra register? Or would this need to be done in a target 
> specific pass?

When you say "an extra address register" would this imply LSR adding an 
additional PHI?

  -Hal

>
> For a reduced test case for this problem, see 
> https://bugs.llvm.org//show_bug.cgi?id=32548.
>
> Thanks,
>
> Jonas
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list