[PATCH] D53160: AMDGPU: Restrict DS load/store vectorizing on SI

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 13 06:49:22 PDT 2018


nhaehnle added a comment.

In https://reviews.llvm.org/D53160#1263197, @arsenm wrote:

> This still doesn't solve the real issue? We still have the selection. The vectorized load could appear in the original source program


Well, an argument could be made that the corruption issue really only occurred because the shader was doing something that would be undefined behavior in the usual C semantics, namely accessing out-of-bounds data. What kind of semantics we want to support for such accesses is kind of up to us. Do we want to support vectorized loads that are partially out-of-bounds? GLSL says that out-of-bounds loads should be handled gracefully, but Mesa will always create scalar loads, so this particular patch is fine.

That said, I suppose we could say that we want partially out-of-bounds vectorized loads to be handled gracefully as well (with per-element out-of-bounds checks), and scalarize those vectorized loads again during selection. I haven't looked into that yet.


Repository:
  rL LLVM

https://reviews.llvm.org/D53160





More information about the llvm-commits mailing list