[PATCH] D69018: [AArch64] Fix offset calculation

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 09:41:32 PDT 2019


smeenai added a comment.

In D69018#1711129 <https://reviews.llvm.org/D69018#1711129>, @sdesmalen wrote:

> Thanks for fixing this @smeenai!
>
> In D69018#1710443 <https://reviews.llvm.org/D69018#1710443>, @smeenai wrote:
>
> > I have no idea how to write a test for this; I'm completely unfamiliar with backends. I have a Swift compilation command that reproduces the OOM mentioned in the commit message, and I think I should be able to get IR or MIR from that, but I'd appreciate guidance crafting a test case if it's considered necessary for this commit.
>
>
> You can create a MIR test with a single instruction accessing a pre-allocated stackslot with a very large offset, and check that the offset is generated correctly.
>
> e.g. the following MIR
>
>   ---
>    name: D69018
>    tracksRegLiveness: true
>    fixedStack:
>      - { id: 0, offset: 2147483648, size: 1}
>    body: |
>      bb.0:
>        $x0 = LDRXui %fixed-stack.0, 0
>        RET_ReallyLR
>    ...
>   
>
> compiles with your patch, but fails to complete (i.e. it keeps running) without it.


Thanks for the test case! I added it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69018





More information about the llvm-commits mailing list