spirv: ptr_add

Implements the ptr_add air tag for spirv.

The implementation for slices is probably wrong, but there seems to be no test for this...
This commit is contained in:
Robin Voetter
2023-05-18 19:25:52 +02:00
parent 3c14438a93
commit 64f99f36a6
2 changed files with 29 additions and 1 deletions

View File

@@ -751,7 +751,6 @@ fn maybe(x: bool) anyerror!?u32 {
test "auto created variables have correct alignment" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
const S = struct {
fn foo(str: [*]const u8) u32 {