Issue |
136780
|
Summary |
[SPIRV] Pointer legalization fails due to unimplemented downcasts
|
Labels |
new issue
|
Assignees |
|
Reporter |
winocm
|
It looks like the pointer legalization bitcast pass fails horrifically if there is a GEP instruction used before that does not end up feeding into the actual load. Stores also similarly fail.
Here is a minimal test case reproducing this issue:
```
%struct.Uniforms = type { %struct.Matrix, %struct.Matrix }
%struct.Matrix = type { [4 x <4 x float>] }
define void @foo(ptr addrspace(2) %0) {
%2 = getelementptr inbounds %struct.Uniforms, ptr addrspace(2) %0, i64 0, i32 0, i32 0, i64 10
%3 = load volatile <4 x float>, ptr addrspace(2) %0, align 16
ret void
}
define void @foo2(ptr addrspace(2) %0) {
%2 = getelementptr inbounds %struct.Uniforms, ptr addrspace(2) %0, i64 0, i32 0, i32 0, i64 10
store volatile <4 x float> splat (float 0.0), ptr addrspace(2) %0, align 16
ret void
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs