[Piglit] [PATCH] cl: Add test for CSR VGPRs caused by SGPR spilling

Jan Vesely jan.vesely at rutgers.edu
Tue May 8 15:45:32 UTC 2018

On Tue, 2018-05-08 at 13:28 +0300, Matt Arsenault wrote:
> > On Apr 8, 2018, at 19:56, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > 
> > On Fri, 2018-04-06 at 00:49 -0400, Matt Arsenault wrote:
> > > ping
> > 
> > I'll need to setup the rocm stack to test this. It will take some time.
> > It should work with clover as well (modulo bugs; asm parser, function
> > calls, ...), right?
> > 
> > Jan
> I thought calls were broken in general with clover because of the
> missing link step? Besides that it should work

Linking works (both linking with libclc and cl-1.2 clLinkProgram) it
just happens at IR level (if you consider that linking) so all function
calls can be inlined.

The problem is that llvm backend generates relocation for function
calls. This relocation is not handled by clover (you could call this
'calls are broken in general').

I see two ways to fix this;
a) fix llvm to use fixup instead of relocation for internal function
b) fix clover to handle the function call relocation.

I tried a) but a simple
"|| (GV->getLinkage() == GlobalValue::InternalLinkage)"
in shouldEmitFixup() is not enough (the fixup value looks wrong)

I still think that a) is preferable, but now that 6.0 is out with the
breakage we'll need to implement b) anyway.

I'll try to find some time to dig a bit more into this, but it's tricky
since wrong jump leaves the GPU in unrecoverable state that needs
manual power cycling on reboot.

> -Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180508/09804459/attachment-0001.sig>

More information about the Piglit mailing list