Skip to content

Commit 529164b

Browse files
committed
Fix Metal filecheck test
The int shift amounts are now converted to unsigned.
1 parent 42358ac commit 529164b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/metal/byte-address-buffer.slang

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ struct TestStruct
2020
void main_kernel(uint3 tid: SV_DispatchThreadID)
2121
{
2222
// CHECK: uint [[WORD0:[a-zA-Z0-9_]+]] = as_type<uint>({{.*}}[(int(0))>>2]);
23-
// CHECK: uint8_t [[A:[a-zA-Z0-9_]+]] = uint8_t([[WORD0]] >> int(0) & 255U);
23+
// CHECK: uint8_t [[A:[a-zA-Z0-9_]+]] = uint8_t([[WORD0]] >> 0U & 255U);
2424
// CHECK: uint [[WORD1:[a-zA-Z0-9_]+]] = as_type<uint>({{.*}}[(int(0))>>2]);
25-
// CHECK: half [[H:[a-zA-Z0-9_]+]] = as_type<half>(ushort([[WORD1]] >> int(16) & 65535U));
25+
// CHECK: half [[H:[a-zA-Z0-9_]+]] = as_type<half>(ushort([[WORD1]] >> 16U & 65535U));
2626

27-
// CHECK: {{.*}}[(int(128))>>2] = as_type<uint32_t>(({{.*}} & 4294967040U) | uint([[A]]) << int(0));
28-
// CHECK: {{.*}}[(int(128))>>2] = as_type<uint32_t>(({{.*}} & 65535U) | uint(as_type<ushort>([[H]])) << int(16));
27+
// CHECK: {{.*}}[(int(128))>>2] = as_type<uint32_t>(({{.*}} & 4294967040U) | uint([[A]]) << 0U);
28+
// CHECK: {{.*}}[(int(128))>>2] = as_type<uint32_t>(({{.*}} & 65535U) | uint(as_type<ushort>([[H]])) << 16U);
2929
buffer.Store(128, buffer.Load<TestStruct>(0));
3030
}

0 commit comments

Comments
 (0)