Files
metal2vulkan/validation/fixtures/public/kernel_bounded_loop_word.ll
T
Anees Iqbal 8b78eaca3b Expand macOS 26 AIR translation coverage
Overhaul the validation workflow around sharded authored cases, dependency-exact observations, incremental indexed corpus audits, bounded parallel translation, and native Metal/Vulkan comparison.\n\nExpand native AIR lowering, reflection, linked-function specialization, resource and stage-interface support, and structural CFG/pointer repair across the harvested macOS 26 corpus. Add exact intrinsic inventory, distributed 16x16x16 matrix lowering, explicit opaque tensor linkage, and regression coverage for the newly supported feature classes.\n\nThe final corpus verification accounts for all 88,819 indexed AIR modules under the current product fingerprint: 65,355 translate and validate directly, 23,464 require exact authored linkage, and zero fail or remain unresolved.
2026-08-13 21:46:27 +02:00

33 lines
1.2 KiB
LLVM

; Owned synthetic fixture for authored bounded-loop execution.
; Not derived from a third-party metallib.
source_filename = "kernel_bounded_loop_word.metal"
define void @bounded_loop_word(ptr addrspace(1) %output, ptr addrspace(1) %count) {
entry:
%limit = load i32, ptr addrspace(1) %count, align 4
br label %loop
loop:
%index = phi i32 [ 0, %entry ], [ %next_index, %body ]
%sum = phi i32 [ 0, %entry ], [ %next_sum, %body ]
%continue = icmp ult i32 %index, %limit
br i1 %continue, label %body, label %exit
body:
%term = add i32 %index, 1
%next_sum = add i32 %sum, %term
%next_index = add i32 %index, 1
br label %loop
exit:
store i32 %sum, ptr addrspace(1) %output, align 4
ret void
}
!air.kernel = !{!0}
!0 = !{ptr @bounded_loop_word, !1, !2}
!1 = !{}
!2 = !{!3, !4}
!3 = !{i32 0, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 0, i32 1, !"air.write", !"air.address_space", i32 1, !"air.arg_type_name", !"uint", !"air.arg_name", !"output"}
!4 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_name", !"uint", !"air.arg_name", !"count"}