mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
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:
committed by
Tint LUCI CQ
parent
e55e2109b3
commit
567f2e4f3b
@@ -3,8 +3,7 @@
|
||||
using namespace metal;
|
||||
kernel void tint_symbol() {
|
||||
float3x3 m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f));
|
||||
thread float3* const v = &(m[1]);
|
||||
*(v) = float3(5.0f, 5.0f, 5.0f);
|
||||
m[1] = float3(5.0f, 5.0f, 5.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
SKIP: crbug.com/tint/816
|
||||
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
kernel void tint_symbol() {
|
||||
float3 v = float3(1.0f, 2.0f, 3.0f);
|
||||
thread float* const f = &(v.y);
|
||||
*(f) = 5.0f;
|
||||
v.y = 5.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
using namespace metal;
|
||||
void main_1() {
|
||||
uint x_10 = 0u;
|
||||
thread uint* const x_1 = &(x_10);
|
||||
thread uint* const x_2 = x_1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
using namespace metal;
|
||||
kernel void tint_symbol() {
|
||||
int i = 123;
|
||||
thread int* const p = &(i);
|
||||
*(p) = 123;
|
||||
*(p) = ((100 + 20) + 3);
|
||||
i = 123;
|
||||
i = ((100 + 20) + 3);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user