Files
metal2vulkan/crates/metal2vulkan-validation/fixtures/public/examples/icb_argument_sampling.ll
T
Anees Iqbal 13b279df1b Squash 11203 commits of translator, runtime, and validation work
Rolls up everything since 43c46ac8 into a single commit. Its tree is
identical to the tree of private master at
b3c77f2d2b20a432be10591a2129547c10b1c24b.

- A Cargo workspace of five crates under crates/: metal2vulkan (the
  translator and the metal2vulkan command), metal2vulkan-runtime (the
  Metal API on Vulkan), metal2vulkan-air (the AIR front end),
  metal2vulkan-validation and metal2vulkan-devtools.
- Dual license: GPL-2.0-or-later OR LGPL-3.0-or-later.
- docs/: API, architecture, fast paths, how-to, Metal coverage,
  refusals, runtime porting and validation guides.

Private-Commit: b3c77f2d2b20a432be10591a2129547c10b1c24b
2026-10-11 20:09:13 +03:00

101 lines
7.3 KiB
LLVM

; Generated by scripts/regen-air-fixtures from icb_argument_sampling.metal (llvm-dis of icb_argument_sampling.air). Do not edit.
; ModuleID = '<stdin>'
source_filename = "-"
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32"
target triple = "air64_v28-apple-macosx26.0.0"
%struct.SampledArguments = type { %"struct.metal::texture2d" }
%"struct.metal::texture2d" = type { ptr addrspace(1) }
@__air_sampler_state = internal addrspace(2) constant [2 x i64] [i64 34901797601020489, i64 0], align 8
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
define <{ <4 x float>, <4 x float> }> @colored_vertex(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %1, i32 noundef %2) local_unnamed_addr #0 {
%4 = zext i32 %2 to i64
%5 = getelementptr inbounds <2 x float>, ptr addrspace(1) %0, i64 %4
%6 = load <2 x float>, ptr addrspace(1) %5, align 8, !tbaa !33, !alias.scope !36, !noalias !39
%7 = shufflevector <2 x float> %6, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
%8 = shufflevector <4 x float> %7, <4 x float> <float poison, float poison, float 0.000000e+00, float 1.000000e+00>, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
%9 = getelementptr inbounds <4 x float>, ptr addrspace(1) %1, i64 %4
%10 = load <4 x float>, ptr addrspace(1) %9, align 16, !tbaa !33, !alias.scope !39, !noalias !36
%11 = insertvalue <{ <4 x float>, <4 x float> }> undef, <4 x float> %8, 0
%12 = insertvalue <{ <4 x float>, <4 x float> }> %11, <4 x float> %10, 1
ret <{ <4 x float>, <4 x float> }> %12
}
; Function Attrs: convergent mustprogress nofree nounwind willreturn memory(read)
define <4 x half> @argument_sampled_fragment(<4 x float> %0, <4 x float> %1, ptr addrspace(2) noundef readonly align 8 captures(none) dereferenceable(8) "air-buffer-no-alias" %2) local_unnamed_addr #1 {
%4 = shufflevector <4 x float> %0, <4 x float> poison, <2 x i32> <i32 0, i32 1>
%5 = fmul fast <2 x float> %4, splat (float 1.250000e-01)
%6 = getelementptr inbounds %struct.SampledArguments, ptr addrspace(2) %2, i64 0, i32 0, i32 0
%7 = load ptr addrspace(1), ptr addrspace(2) %6, align 8, !tbaa !41, !alias.scope !44
%8 = tail call { <4 x half>, i8 } @air.sample_texture_2d.v4f16(ptr addrspace(1) readonly captures(none) %7, ptr addrspace(2) readonly captures(none) @__air_sampler_state, <2 x float> %5, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #3
%9 = extractvalue { <4 x half>, i8 } %8, 0
ret <4 x half> %9
}
; Function Attrs: convergent mustprogress nofree nounwind willreturn memory(argmem: read)
declare { <4 x half>, i8 } @air.sample_texture_2d.v4f16(ptr addrspace(1) readonly captures(none), ptr addrspace(2) readonly captures(none), <2 x float>, i1, <2 x i32>, i1, float, float, i32) local_unnamed_addr #2
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
attributes #1 = { convergent mustprogress nofree nounwind willreturn memory(read) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" }
attributes #2 = { convergent mustprogress nofree nounwind willreturn memory(argmem: read) }
attributes #3 = { convergent nounwind willreturn memory(argmem: read) }
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
!air.vertex = !{!9}
!air.fragment = !{!17}
!air.compile_options = !{!26, !27, !28}
!air.sampler_states = !{!29}
!llvm.ident = !{!30}
!air.version = !{!31}
!air.language_version = !{!32}
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]}
!1 = !{i32 1, !"wchar_size", i32 4}
!2 = !{i32 7, !"frame-pointer", i32 2}
!3 = !{i32 7, !"air.max_device_buffers", i32 31}
!4 = !{i32 7, !"air.max_constant_buffers", i32 31}
!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31}
!6 = !{i32 7, !"air.max_textures", i32 128}
!7 = !{i32 7, !"air.max_read_write_textures", i32 8}
!8 = !{i32 7, !"air.max_samplers", i32 16}
!9 = !{ptr @colored_vertex, !10, !13}
!10 = !{!11, !12}
!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
!12 = !{!"air.vertex_output", !"generated(5colorDv4_f)", !"air.arg_type_name", !"float4", !"air.arg_name", !"color"}
!13 = !{!14, !15, !16}
!14 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"float2", !"air.arg_name", !"positions"}
!15 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 16, !"air.arg_type_align_size", i32 16, !"air.arg_type_name", !"float4", !"air.arg_name", !"colors"}
!16 = !{i32 2, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"}
!17 = !{ptr @argument_sampled_fragment, !18, !20}
!18 = !{!19}
!19 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"half4"}
!20 = !{!21, !22, !23}
!21 = !{i32 0, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"}
!22 = !{i32 1, !"air.fragment_input", !"generated(5colorDv4_f)", !"air.flat", !"air.arg_type_name", !"float4", !"air.arg_name", !"color", !"air.arg_unused"}
!23 = !{i32 2, !"air.indirect_buffer", !"air.buffer_size", i32 8, !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.struct_type_info", !24, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"SampledArguments", !"air.arg_name", !"arguments"}
!24 = !{i32 0, i32 8, i32 0, !"texture2d<half, sample>", !"source", !"air.indirect_argument", !25}
!25 = !{i32 0, !"air.texture", !"air.location_index", i32 0, i32 1, !"air.sample", !"air.arg_type_name", !"texture2d<half, sample>", !"air.arg_name", !"source"}
!26 = !{!"air.compile.denorms_disable"}
!27 = !{!"air.compile.fast_math_enable"}
!28 = !{!"air.compile.framebuffer_fetch_enable"}
!29 = !{!"air.sampler_state", ptr addrspace(2) @__air_sampler_state}
!30 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"}
!31 = !{i32 2, i32 8, i32 0}
!32 = !{!"Metal", i32 4, i32 0, i32 0}
!33 = !{!34, !34, i64 0}
!34 = !{!"omnipotent char", !35, i64 0}
!35 = !{!"Simple C++ TBAA"}
!36 = !{!37}
!37 = distinct !{!37, !38, !"air-alias-scope-arg(0)"}
!38 = distinct !{!38, !"air-alias-scopes(colored_vertex)"}
!39 = !{!40}
!40 = distinct !{!40, !38, !"air-alias-scope-arg(1)"}
!41 = !{!42, !43, i64 0}
!42 = !{!"_ZTSN5metal9texture2dIDhLNS_6accessE0ELNS_16memory_coherenceE0EvEE", !43, i64 0}
!43 = !{!"__metal_texture_2d_t", !34, i64 0}
!44 = !{!45}
!45 = distinct !{!45, !46, !"air-alias-scope-arg(2)"}
!46 = distinct !{!46, !"air-alias-scopes(argument_sampled_fragment)"}