transform/msl: Run InlinePointerLets and Simplify

This will be relied on by the upcoming arrayLength transform.

Update test expectations.

Change-Id: Ib74b647abcd6f4393f9899ce40bbf06f6e53e7f4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55180
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
James Price
2021-06-18 09:47:23 +00:00
committed by Tint LUCI CQ
parent e55e2109b3
commit 567f2e4f3b
16 changed files with 47 additions and 73 deletions

View File

@@ -3,8 +3,7 @@
using namespace metal;
kernel void tint_symbol() {
int i = 123;
thread int* const p = &(i);
int const use = (*(p) + 1);
int const use = (i + 1);
return;
}

View File

@@ -3,8 +3,7 @@
using namespace metal;
kernel void tint_symbol() {
thread int tint_symbol_1 = 123;
thread int* const p = &(tint_symbol_1);
int const use = (*(p) + 1);
int const use = (tint_symbol_1 + 1);
return;
}

View File

@@ -6,8 +6,7 @@ struct S {
};
kernel void tint_symbol(device S& v [[buffer(0)]]) {
device int* const p = &(v.a);
int const use = (*(p) + 1);
int const use = (v.a + 1);
return;
}

View File

@@ -6,8 +6,7 @@ struct S {
};
kernel void tint_symbol(constant S& v [[buffer(0)]]) {
constant int* const p = &(v.a);
int const use = (*(p) + 1);
int const use = (v.a + 1);
return;
}

View File

@@ -4,8 +4,7 @@ using namespace metal;
kernel void tint_symbol() {
threadgroup int tint_symbol_1 = 0;
tint_symbol_1 = 123;
threadgroup int* const p = &(tint_symbol_1);
int const use = (*(p) + 1);
int const use = (tint_symbol_1 + 1);
return;
}