From ffcb1030f72af757fc03aa395e19b976d6405126 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 3 Dec 2024 15:52:02 -0800 Subject: Add intrinsics for aligned load/store. (#5736) * Add intrinsics for aligned load/store. * Fix. * Update comment. * Implement aligned load/store as intrinsic_op. * Fix. * Add proposal doc. * fix typo. --- tests/spirv/aligned-load-store.slang | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/spirv/aligned-load-store.slang (limited to 'tests/spirv') diff --git a/tests/spirv/aligned-load-store.slang b/tests/spirv/aligned-load-store.slang new file mode 100644 index 000000000..c6b958dc2 --- /dev/null +++ b/tests/spirv/aligned-load-store.slang @@ -0,0 +1,13 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// CHECK: OpLoad {{.*}} Aligned 8 +// CHECK: OpStore {{.*}} Aligned 16 + +uniform float4* data; + +[numthreads(1,1,1)] +void computeMain() +{ + var v = loadAligned<8>((float2x4*)data); + storeAligned<16>((float2x4*)data+1, v); +} \ No newline at end of file -- cgit v1.2.3