diff --git a/crates/metal2vulkan-harness/src/authored.rs b/crates/metal2vulkan-harness/src/authored.rs index c45806c99..f3004603a 100644 --- a/crates/metal2vulkan-harness/src/authored.rs +++ b/crates/metal2vulkan-harness/src/authored.rs @@ -21,7 +21,7 @@ pub struct Workload { } /// The authored workloads. -pub const WORKLOADS: [Workload; 31] = [ +pub const WORKLOADS: [Workload; 36] = [ Workload { name: "bandwidth", plan: bandwidth, @@ -114,6 +114,26 @@ pub const WORKLOADS: [Workload; 31] = [ name: "sampling_deep_1x1x192", plan: sampling_deep_1x1x192, }, + Workload { + name: "sampling_deep_512x512x16_8x8x1", + plan: sampling_deep_512x512x16_8x8x1, + }, + Workload { + name: "sampling_deep_512x512x16_16x16x1", + plan: sampling_deep_512x512x16_16x16x1, + }, + Workload { + name: "sampling_deep_512x512x16_4x4x4", + plan: sampling_deep_512x512x16_4x4x4, + }, + Workload { + name: "sampling_distinct_64x64x16", + plan: sampling_distinct_64x64x16, + }, + Workload { + name: "sampling_distinct_512x512x16", + plan: sampling_distinct_512x512x16, + }, Workload { name: "wide_bindings", plan: wide_bindings, @@ -1106,10 +1126,15 @@ fn texture(index: u32, texture: usize) -> Binding { /// below 4. const TEXEL_TOLERANCE: f32 = 1.0 / 256.0; -/// A `side` by `side` texture's starting texels, four channels each, every one a sixteenth of a -/// whole number below 64: exact in `half`. +/// A `side` by `side` texture's starting texels ([`sixteenths_of`]). fn sixteenths(seed: u64, side: u32) -> Vec { - let count = 4 * side as usize * side as usize; + sixteenths_of(seed, side, side) +} + +/// A `width` by `height` texture's starting texels, four channels each, every one a sixteenth of +/// a whole number below 64: exact in `half`. +fn sixteenths_of(seed: u64, width: u32, height: u32) -> Vec { + let count = 4 * width as usize * height as usize; (words(seed, count).into_iter()) .map(|word| (word & 63) as f32 / 16.0) .collect() @@ -1238,36 +1263,57 @@ fn constexpr_sampling() -> Plan { /// texel kernels need), one texture write a thread: each texel in the grid the mean of its four /// source texels, the rest left zero. The shapes are those a recorded stream's image-only kernels /// ran deep grids at, thin and ragged ones among them. -fn sampling_deep(name: &str, [x, y, z]: [u32; 3]) -> Plan { +fn sampling_deep(name: &str, threads: [u32; 3]) -> Plan { + deep_sampling(name, threads, [8, 8, 4], false) +} + +/// [`sampling_deep`] in threadgroups of `per_group`; with `distinct`, through +/// `sample_down_distinct`, whose layer `z` downsamples its own `2t` by `2t` rows of a `2t` by +/// `2t·z` source, so no two layers read the same texels. +fn deep_sampling(name: &str, [x, y, z]: [u32; 3], per_group: [u32; 3], distinct: bool) -> Plan { let t = x.max(y).next_multiple_of(16); let side = 2 * t; - let source = sixteenths(18, side); + let layers = if distinct { z } else { 1 }; + let source = sixteenths_of(18, side, side * layers); let at = |i: u32, j: u32, c: u32| source[(4 * (j * side + i) + c) as usize]; - let layer: Vec = (0..t) - .flat_map(|j| (0..t).flat_map(move |i| (0..4).map(move |c| (i, j, c)))) - .map(|(i, j, c)| match i < x && j < y { - true => { - let (i, j) = (2 * i, 2 * j); - (at(i, j, c) + at(i + 1, j, c) + at(i, j + 1, c) + at(i + 1, j + 1, c)) / 4.0 - } - false => 0.0, - }) - .collect(); - let expected = (0..z).flat_map(|_| layer.iter().copied()).collect(); + let layer = |k: u32| -> Vec { + let rows = 2 * t * k.min(layers - 1); + (0..t) + .flat_map(|j| (0..t).flat_map(move |i| (0..4).map(move |c| (i, j, c)))) + .map(|(i, j, c)| match i < x && j < y { + true => { + let (i, j) = (2 * i, rows + 2 * j); + (at(i, j, c) + at(i + 1, j, c) + at(i, j + 1, c) + at(i + 1, j + 1, c)) / 4.0 + } + false => 0.0, + }) + .collect() + }; + let expected = match distinct { + true => (0..z).flat_map(layer).collect(), + false => { + let one = layer(0); + (0..z).flat_map(|_| one.iter().copied()).collect() + } + }; + let function = match distinct { + true => "sample_down_distinct", + false => "sample_down_layers", + }; let mut plan = sampling_plan( name, - "sample_down_layers", + function, (16, Vec::new()), (16, expected), Some(Filter::Linear), ); plan.textures = vec![ - TexturePlan::rgba16_float(side, side, Some(source)), + TexturePlan::rgba16_float(side, side * layers, Some(source)), TexturePlan::rgba16_float(t, t * z, Some(vec![0.0; 4 * (t * t * z) as usize])), ]; plan.dispatches[0].grid = Grid::Threads { threads: [u64::from(x), u64::from(y), u64::from(z)], - per_group: [8, 8, 4], + per_group: per_group.map(u64::from), }; plan } @@ -1302,6 +1348,51 @@ fn sampling_deep_1x1x192() -> Plan { sampling_deep("sampling_deep_1x1x192", [1, 1, 192]) } +/// [`sampling_deep`] over a 512x512x16 grid in threadgroups of 8x8x1. +fn sampling_deep_512x512x16_8x8x1() -> Plan { + deep_sampling( + "sampling_deep_512x512x16_8x8x1", + [512, 512, 16], + [8, 8, 1], + false, + ) +} + +/// [`sampling_deep`] over a 512x512x16 grid in threadgroups of 16x16x1. +fn sampling_deep_512x512x16_16x16x1() -> Plan { + deep_sampling( + "sampling_deep_512x512x16_16x16x1", + [512, 512, 16], + [16, 16, 1], + false, + ) +} + +/// [`sampling_deep`] over a 512x512x16 grid in threadgroups of 4x4x4. +fn sampling_deep_512x512x16_4x4x4() -> Plan { + deep_sampling( + "sampling_deep_512x512x16_4x4x4", + [512, 512, 16], + [4, 4, 4], + false, + ) +} + +/// [`deep_sampling`] of distinct layers over a 64x64x16 grid in threadgroups of 8x8x4. +fn sampling_distinct_64x64x16() -> Plan { + deep_sampling("sampling_distinct_64x64x16", [64, 64, 16], [8, 8, 4], true) +} + +/// [`deep_sampling`] of distinct layers over a 512x512x16 grid in threadgroups of 8x8x4. +fn sampling_distinct_512x512x16() -> Plan { + deep_sampling( + "sampling_distinct_512x512x16", + [512, 512, 16], + [8, 8, 4], + true, + ) +} + /// A texture read out to a buffer: each thread of a 2048x2048 grid, in threadgroups of 16x16, /// reads its texel of an `RGBA16Float` texture and stores it as a `float4` at `y * 2048 + x` /// (`texels_out`), 64 MiB stored. The kernel reads its position in the grid and nothing of its diff --git a/crates/metal2vulkan-validation/fixtures/public/harness/workloads.air.ll b/crates/metal2vulkan-validation/fixtures/public/harness/workloads.air.ll index cbcbc77ae..fb3b2df8e 100644 --- a/crates/metal2vulkan-validation/fixtures/public/harness/workloads.air.ll +++ b/crates/metal2vulkan-validation/fixtures/public/harness/workloads.air.ll @@ -20,9 +20,9 @@ target triple = "air64_v28-apple-macosx26.0.0" define void @copy_words(<4 x i32> addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, <4 x i32> addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, i32 noundef %2) local_unnamed_addr #0 { %4 = zext i32 %2 to i64 %5 = getelementptr inbounds <4 x i32>, <4 x i32> addrspace(1)* %0, i64 %4 - %6 = load <4 x i32>, <4 x i32> addrspace(1)* %5, align 16, !tbaa !129, !alias.scope !132, !noalias !135 + %6 = load <4 x i32>, <4 x i32> addrspace(1)* %5, align 16, !tbaa !130, !alias.scope !133, !noalias !136 %7 = getelementptr inbounds <4 x i32>, <4 x i32> addrspace(1)* %1, i64 %4 - store <4 x i32> %6, <4 x i32> addrspace(1)* %7, align 16, !tbaa !129, !alias.scope !135, !noalias !132 + store <4 x i32> %6, <4 x i32> addrspace(1)* %7, align 16, !tbaa !130, !alias.scope !136, !noalias !133 ret void } @@ -30,14 +30,14 @@ define void @copy_words(<4 x i32> addrspace(1)* nocapture noundef readonly "air- define void @scale_offset(<4 x float> addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, <4 x float> addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, <2 x float> addrspace(2)* nocapture noundef readonly align 8 dereferenceable(8) "air-buffer-no-alias" %2, i32 noundef %3) local_unnamed_addr #0 { %5 = zext i32 %3 to i64 %6 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %0, i64 %5 - %7 = load <4 x float>, <4 x float> addrspace(1)* %6, align 16, !tbaa !129, !alias.scope !137, !noalias !140 - %8 = load <2 x float>, <2 x float> addrspace(2)* %2, align 8, !alias.scope !143, !noalias !144 + %7 = load <4 x float>, <4 x float> addrspace(1)* %6, align 16, !tbaa !130, !alias.scope !138, !noalias !141 + %8 = load <2 x float>, <2 x float> addrspace(2)* %2, align 8, !alias.scope !144, !noalias !145 %9 = shufflevector <2 x float> %8, <2 x float> undef, <4 x i32> zeroinitializer %10 = fmul fast <4 x float> %9, %7 %11 = shufflevector <2 x float> %8, <2 x float> undef, <4 x i32> %12 = fadd fast <4 x float> %10, %11 %13 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %1, i64 %5 - store <4 x float> %12, <4 x float> addrspace(1)* %13, align 16, !tbaa !129, !alias.scope !145, !noalias !146 + store <4 x float> %12, <4 x float> addrspace(1)* %13, align 16, !tbaa !130, !alias.scope !146, !noalias !147 ret void } @@ -50,7 +50,7 @@ define void @fma_chains(float addrspace(1)* nocapture noundef writeonly "air-buf %8 = and i32 %7, 31 %9 = tail call fast float @air.convert.f.f32.u.i32(i32 %8) #19 %10 = fmul fast float %9, 3.125000e-02 - %11 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !147, !alias.scope !149, !noalias !152 + %11 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !148, !alias.scope !150, !noalias !153 %12 = icmp eq i32 %11, 0 br i1 %12, label %13, label %19 @@ -60,7 +60,7 @@ define void @fma_chains(float addrspace(1)* nocapture noundef writeonly "air-buf %16 = fadd fast float %15, %14 %17 = zext i32 %2 to i64 %18 = getelementptr inbounds float, float addrspace(1)* %0, i64 %17 - store float %16, float addrspace(1)* %18, align 4, !tbaa !154, !alias.scope !152, !noalias !149 + store float %16, float addrspace(1)* %18, align 4, !tbaa !155, !alias.scope !153, !noalias !150 ret void 19: ; preds = %3, %19 @@ -73,7 +73,7 @@ define void @fma_chains(float addrspace(1)* nocapture noundef writeonly "air-buf %26 = tail call fast float @air.fma.f32(float %21, float 8.750000e-01, float %25) #19 %27 = add nuw i32 %20, 1 %28 = icmp eq i32 %27, %11 - br i1 %28, label %13, label %19, !llvm.loop !156 + br i1 %28, label %13, label %19, !llvm.loop !157 } ; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn @@ -83,16 +83,16 @@ declare float @air.convert.f.f32.u.i32(i32) local_unnamed_addr #2 define void @block_scan(i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, i32 addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 { %5 = zext i32 %2 to i64 %6 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %5 - %7 = load i32, i32 addrspace(1)* %6, align 4, !tbaa !147, !alias.scope !158, !noalias !161 + %7 = load i32, i32 addrspace(1)* %6, align 4, !tbaa !148, !alias.scope !159, !noalias !162 %8 = zext i32 %3 to i64 %9 = getelementptr inbounds [256 x i32], [256 x i32] addrspace(3)* @_ZZ10block_scanPU9MTLdeviceKjPU9MTLdevicejjjE4sums, i64 0, i64 %8 - store i32 %7, i32 addrspace(3)* %9, align 4, !tbaa !147 + store i32 %7, i32 addrspace(3)* %9, align 4, !tbaa !148 tail call void @air.wg.barrier(i32 2, i32 1) #20 br label %12 10: ; preds = %21 %11 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %5 - store i32 %23, i32 addrspace(1)* %11, align 4, !tbaa !147, !alias.scope !161, !noalias !158 + store i32 %23, i32 addrspace(1)* %11, align 4, !tbaa !148, !alias.scope !162, !noalias !159 ret void 12: ; preds = %4, %21 @@ -105,23 +105,23 @@ define void @block_scan(i32 addrspace(1)* nocapture noundef readonly "air-buffer %17 = sub i32 %3, %14 %18 = zext i32 %17 to i64 %19 = getelementptr inbounds [256 x i32], [256 x i32] addrspace(3)* @_ZZ10block_scanPU9MTLdeviceKjPU9MTLdevicejjjE4sums, i64 0, i64 %18 - %20 = load i32, i32 addrspace(3)* %19, align 4, !tbaa !147 + %20 = load i32, i32 addrspace(3)* %19, align 4, !tbaa !148 br label %21 21: ; preds = %12, %16 %22 = phi i32 [ %20, %16 ], [ 0, %12 ] tail call void @air.wg.barrier(i32 2, i32 1) #20 %23 = add i32 %22, %13 - store i32 %23, i32 addrspace(3)* %9, align 4, !tbaa !147 + store i32 %23, i32 addrspace(3)* %9, align 4, !tbaa !148 tail call void @air.wg.barrier(i32 2, i32 1) #20 %24 = shl nuw nsw i32 %14, 1 %25 = icmp ult i32 %14, 128 - br i1 %25, label %12, label %10, !llvm.loop !163 + br i1 %25, label %12, label %10, !llvm.loop !164 } ; Function Attrs: convergent mustprogress nounwind define void @reduce_sum(i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, i32 addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, <2 x i32> addrspace(2)* nocapture noundef readonly align 8 dereferenceable(8) "air-buffer-no-alias" %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9) local_unnamed_addr #3 { - %11 = load <2 x i32>, <2 x i32> addrspace(2)* %2, align 8, !alias.scope !164, !noalias !167 + %11 = load <2 x i32>, <2 x i32> addrspace(2)* %2, align 8, !alias.scope !165, !noalias !168 %12 = extractelement <2 x i32> %11, i64 1 %13 = mul i32 %12, %3 %14 = add i32 %13, %12 @@ -142,16 +142,16 @@ define void @reduce_sum(i32 addrspace(1)* nocapture noundef readonly "air-buffer %25 = phi i32 [ %29, %23 ], [ 0, %10 ] %26 = zext i32 %24 to i64 %27 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %26 - %28 = load i32, i32 addrspace(1)* %27, align 4, !tbaa !147, !alias.scope !170, !noalias !171 + %28 = load i32, i32 addrspace(1)* %27, align 4, !tbaa !148, !alias.scope !171, !noalias !172 %29 = add i32 %28, %25 %30 = add i32 %24, %5 %31 = icmp ult i32 %30, %16 - br i1 %31, label %23, label %19, !llvm.loop !172 + br i1 %31, label %23, label %19, !llvm.loop !173 32: ; preds = %19 %33 = zext i32 %7 to i64 %34 = getelementptr inbounds [256 x i32], [256 x i32] addrspace(3)* @_ZZ10reduce_sumPU9MTLdeviceKjPU9MTLdevicejRU11MTLconstantKDv2_jjjjjjjjE7partial, i64 0, i64 %33 - store i32 %21, i32 addrspace(3)* %34, align 4, !tbaa !147 + store i32 %21, i32 addrspace(3)* %34, align 4, !tbaa !148 br label %35 35: ; preds = %32, %19 @@ -173,16 +173,16 @@ define void @reduce_sum(i32 addrspace(1)* nocapture noundef readonly "air-buffer %44 = phi i32 [ %48, %42 ], [ 0, %37 ] %45 = zext i32 %43 to i64 %46 = getelementptr inbounds [256 x i32], [256 x i32] addrspace(3)* @_ZZ10reduce_sumPU9MTLdeviceKjPU9MTLdevicejRU11MTLconstantKDv2_jjjjjjjjE7partial, i64 0, i64 %45 - %47 = load i32, i32 addrspace(3)* %46, align 4, !tbaa !147 + %47 = load i32, i32 addrspace(3)* %46, align 4, !tbaa !148 %48 = add i32 %47, %44 %49 = add i32 %43, %9 %50 = icmp ult i32 %49, %8 - br i1 %50, label %42, label %39, !llvm.loop !173 + br i1 %50, label %42, label %39, !llvm.loop !174 51: ; preds = %39 %52 = zext i32 %3 to i64 %53 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %52 - store i32 %41, i32 addrspace(1)* %53, align 4, !tbaa !147, !alias.scope !174, !noalias !175 + store i32 %41, i32 addrspace(1)* %53, align 4, !tbaa !148, !alias.scope !175, !noalias !176 br label %54 54: ; preds = %39, %51, %35 @@ -192,7 +192,7 @@ define void @reduce_sum(i32 addrspace(1)* nocapture noundef readonly "air-buffer ; Function Attrs: argmemonly mustprogress nofree nosync nounwind define void @binomial3x3(<4 x float> addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, <4 x float> addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, <2 x i32> addrspace(2)* nocapture noundef readonly align 8 dereferenceable(8) "air-buffer-no-alias" %2, <2 x i32> noundef %3) local_unnamed_addr #4 { %5 = extractelement <2 x i32> %3, i64 1 - %6 = load <2 x i32>, <2 x i32> addrspace(2)* %2, align 8, !alias.scope !176, !noalias !179 + %6 = load <2 x i32>, <2 x i32> addrspace(2)* %2, align 8, !alias.scope !177, !noalias !180 %7 = extractelement <2 x i32> %6, i64 1 %8 = add nsw i32 %7, -1 %9 = extractelement <2 x i32> %3, i64 0 @@ -206,7 +206,7 @@ define void @binomial3x3(<4 x float> addrspace(1)* nocapture noundef readonly "a %15 = add i32 %14, %9 %16 = zext i32 %15 to i64 %17 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %1, i64 %16 - store <4 x float> %13, <4 x float> addrspace(1)* %17, align 16, !tbaa !129, !alias.scope !182, !noalias !183 + store <4 x float> %13, <4 x float> addrspace(1)* %17, align 16, !tbaa !130, !alias.scope !183, !noalias !184 ret void 18: ; preds = %4, %26 @@ -222,7 +222,7 @@ define void @binomial3x3(<4 x float> addrspace(1)* nocapture noundef readonly "a 26: ; preds = %29 %27 = add nsw i32 %20, 1 %28 = icmp eq i32 %27, 2 - br i1 %28, label %12, label %18, !llvm.loop !184 + br i1 %28, label %12, label %18, !llvm.loop !185 29: ; preds = %18, %29 %30 = phi <4 x float> [ %19, %18 ], [ %44, %29 ] @@ -235,25 +235,25 @@ define void @binomial3x3(<4 x float> addrspace(1)* nocapture noundef readonly "a %37 = add i32 %33, %25 %38 = zext i32 %37 to i64 %39 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %0, i64 %38 - %40 = load <4 x float>, <4 x float> addrspace(1)* %39, align 16, !tbaa !129, !alias.scope !185, !noalias !186 + %40 = load <4 x float>, <4 x float> addrspace(1)* %39, align 16, !tbaa !130, !alias.scope !186, !noalias !187 %41 = insertelement <4 x float> poison, float %36, i64 0 %42 = shufflevector <4 x float> %41, <4 x float> poison, <4 x i32> zeroinitializer %43 = fmul fast <4 x float> %42, %40 %44 = fadd fast <4 x float> %43, %30 %45 = add nsw i32 %31, 1 %46 = icmp eq i32 %45, 2 - br i1 %46, label %26, label %29, !llvm.loop !187 + br i1 %46, label %26, label %29, !llvm.loop !188 } ; Function Attrs: argmemonly mustprogress nofree norecurse nosync nounwind willreturn define void @lcg_step(i32 addrspace(1)* nocapture noundef "air-buffer-no-alias" %0, i32 addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %1, i32 noundef %2) local_unnamed_addr #0 { %4 = zext i32 %2 to i64 %5 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %4 - %6 = load i32, i32 addrspace(1)* %5, align 4, !tbaa !147, !alias.scope !188, !noalias !191 + %6 = load i32, i32 addrspace(1)* %5, align 4, !tbaa !148, !alias.scope !189, !noalias !192 %7 = mul i32 %6, 1664525 - %8 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !147, !alias.scope !191, !noalias !188 + %8 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !148, !alias.scope !192, !noalias !189 %9 = add i32 %7, %8 - store i32 %9, i32 addrspace(1)* %5, align 4, !tbaa !147, !alias.scope !188, !noalias !191 + store i32 %9, i32 addrspace(1)* %5, align 4, !tbaa !148, !alias.scope !189, !noalias !192 ret void } @@ -264,7 +264,7 @@ define void @narrow_mix(i32 addrspace(1)* nocapture noundef writeonly "air-buffe %6 = xor i16 %4, 23130 %7 = trunc i32 %2 to i8 %8 = lshr i32 %2, 3 - %9 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !147, !alias.scope !193, !noalias !196 + %9 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !148, !alias.scope !194, !noalias !197 %10 = icmp eq i32 %9, 0 br i1 %10, label %11, label %27 @@ -284,7 +284,7 @@ define void @narrow_mix(i32 addrspace(1)* nocapture noundef writeonly "air-buffe %24 = xor i32 %21, %23 %25 = zext i32 %2 to i64 %26 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %25 - store i32 %24, i32 addrspace(1)* %26, align 4, !tbaa !147, !alias.scope !196, !noalias !193 + store i32 %24, i32 addrspace(1)* %26, align 4, !tbaa !148, !alias.scope !197, !noalias !194 ret void 27: ; preds = %3, %27 @@ -309,20 +309,20 @@ define void @narrow_mix(i32 addrspace(1)* nocapture noundef writeonly "air-buffe %46 = add nsw i32 %45, %42 %47 = add nuw i32 %28, 1 %48 = icmp eq i32 %47, %9 - br i1 %48, label %11, label %27, !llvm.loop !198 + br i1 %48, label %11, label %27, !llvm.loop !199 } ; Function Attrs: mustprogress nounwind willreturn define void @texels_in(<4 x float> addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, i32 addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %1, %struct._texture_2d_t addrspace(1)* %2, <2 x i32> noundef %3) local_unnamed_addr #6 { %5 = extractelement <2 x i32> %3, i64 1 - %6 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !147, !alias.scope !199, !noalias !202 + %6 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !148, !alias.scope !200, !noalias !203 %7 = mul i32 %6, %5 %8 = extractelement <2 x i32> %3, i64 0 %9 = add i32 %7, %8 %10 = zext i32 %9 to i64 %11 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %0, i64 %10 - %12 = load <4 x float>, <4 x float> addrspace(1)* %11, align 16, !tbaa !129, !alias.scope !205, !noalias !206 - tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %2, <2 x i32> %3, <4 x float> %12, i32 0, i32 2) #21, !alias.scope !207, !noalias !208 + %12 = load <4 x float>, <4 x float> addrspace(1)* %11, align 16, !tbaa !130, !alias.scope !206, !noalias !207 + tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %2, <2 x i32> %3, <4 x float> %12, i32 0, i32 2) #21, !alias.scope !208, !noalias !209 ret void } @@ -332,30 +332,30 @@ define void @texels_out(%struct._texture_2d_t addrspace(1)* nocapture readonly % %6 = tail call { <4 x float>, i8 } @air.read_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* %5, <2 x i32> %3, <2 x i32> zeroinitializer, i32 0, i32 1) #23 %7 = extractvalue { <4 x float>, i8 } %6, 0 %8 = extractelement <2 x i32> %3, i64 1 - %9 = load i32, i32 addrspace(2)* %2, align 4, !tbaa !147, !alias.scope !209, !noalias !212 + %9 = load i32, i32 addrspace(2)* %2, align 4, !tbaa !148, !alias.scope !210, !noalias !213 %10 = mul i32 %9, %8 %11 = extractelement <2 x i32> %3, i64 0 %12 = add i32 %10, %11 %13 = zext i32 %12 to i64 %14 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %1, i64 %13 - store <4 x float> %7, <4 x float> addrspace(1)* %14, align 16, !tbaa !129, !alias.scope !215, !noalias !216 + store <4 x float> %7, <4 x float> addrspace(1)* %14, align 16, !tbaa !130, !alias.scope !216, !noalias !217 ret void } ; Function Attrs: convergent mustprogress nounwind willreturn define void @sample_down(%struct._texture_2d_t addrspace(1)* %0, %struct._texture_2d_t addrspace(1)* %1, %struct._sampler_t addrspace(2)* nocapture readonly %2, <2 x i32> noundef %3) local_unnamed_addr #8 { - %5 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !217, !noalias !220 + %5 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !218, !noalias !221 %6 = tail call fast float @air.convert.f.f32.u.i32(i32 %5) #19 %7 = insertelement <2 x float> undef, float %6, i64 0 - %8 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !217, !noalias !220 + %8 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !218, !noalias !221 %9 = tail call fast float @air.convert.f.f32.u.i32(i32 %8) #19 %10 = insertelement <2 x float> %7, float %9, i64 1 %11 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %3) #19 %12 = fadd fast <2 x float> %11, %13 = fdiv fast <2 x float> %12, %10 - %14 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* nocapture readonly %2, <2 x float> %13, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !222 + %14 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* nocapture readonly %2, <2 x float> %13, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !223 %15 = extractvalue { <4 x float>, i8 } %14, 0 - tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %3, <4 x float> %15, i32 0, i32 2) #21, !alias.scope !217, !noalias !220 + tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %3, <4 x float> %15, i32 0, i32 2) #21, !alias.scope !218, !noalias !221 ret void } @@ -364,10 +364,10 @@ declare <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32>) local_unnamed_addr # ; Function Attrs: convergent mustprogress nounwind willreturn define void @sample_up(%struct._texture_2d_t addrspace(1)* %0, %struct._texture_2d_t addrspace(1)* %1, <2 x i32> noundef %2) local_unnamed_addr #8 { - %4 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !223 + %4 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !224 %5 = tail call fast float @air.convert.f.f32.u.i32(i32 %4) #19 %6 = insertelement <2 x float> undef, float %5, i64 0 - %7 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !223 + %7 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !224 %8 = tail call fast float @air.convert.f.f32.u.i32(i32 %7) #19 %9 = insertelement <2 x float> %6, float %8, i64 1 %10 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %2) #19 @@ -375,15 +375,15 @@ define void @sample_up(%struct._texture_2d_t addrspace(1)* %0, %struct._texture_ %12 = fdiv fast <2 x float> %11, %9 %13 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* nocapture readonly bitcast ([2 x i64] addrspace(2)* @__air_sampler_state to %struct._sampler_t addrspace(2)*), <2 x float> %12, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24 %14 = extractvalue { <4 x float>, i8 } %13, 0 - tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %2, <4 x float> %14, i32 0, i32 2) #21, !alias.scope !223 + tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %2, <4 x float> %14, i32 0, i32 2) #21, !alias.scope !224 ret void } ; Function Attrs: convergent mustprogress nounwind willreturn define void @sample_down_layers(%struct._texture_2d_t addrspace(1)* %0, %struct._texture_2d_t addrspace(1)* %1, %struct._sampler_t addrspace(2)* nocapture readonly %2, <3 x i32> noundef %3) local_unnamed_addr #8 { - %5 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, i32 0) #23, !alias.scope !226, !noalias !229 + %5 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, i32 0) #23, !alias.scope !227, !noalias !230 %6 = lshr i32 %5, 1 - %7 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !226, !noalias !229 + %7 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !227, !noalias !230 %8 = tail call fast float @air.convert.f.f32.u.i32(i32 %7) #19 %9 = insertelement <2 x float> undef, float %8, i64 0 %10 = tail call fast float @air.convert.f.f32.u.i32(i32 %6) #19 @@ -392,7 +392,7 @@ define void @sample_down_layers(%struct._texture_2d_t addrspace(1)* %0, %struct. %13 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %12) #19 %14 = fadd fast <2 x float> %13, %15 = fdiv fast <2 x float> %14, %11 - %16 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* nocapture readonly %2, <2 x float> %15, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !231 + %16 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* nocapture readonly %2, <2 x float> %15, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !232 %17 = extractvalue { <4 x float>, i8 } %16, 0 %18 = extractelement <3 x i32> %3, i64 0 %19 = insertelement <2 x i32> undef, i32 %18, i64 0 @@ -401,7 +401,31 @@ define void @sample_down_layers(%struct._texture_2d_t addrspace(1)* %0, %struct. %22 = mul i32 %6, %21 %23 = add i32 %22, %20 %24 = insertelement <2 x i32> %19, i32 %23, i64 1 - tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %24, <4 x float> %17, i32 0, i32 2) #21, !alias.scope !226, !noalias !229 + tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %24, <4 x float> %17, i32 0, i32 2) #21, !alias.scope !227, !noalias !230 + ret void +} + +; Function Attrs: convergent mustprogress nounwind willreturn +define void @sample_down_distinct(%struct._texture_2d_t addrspace(1)* %0, %struct._texture_2d_t addrspace(1)* %1, %struct._sampler_t addrspace(2)* nocapture readonly %2, <3 x i32> noundef %3) local_unnamed_addr #8 { + %5 = tail call i32 @air.get_width_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !233, !noalias !236 + %6 = tail call fast float @air.convert.f.f32.u.i32(i32 %5) #19 + %7 = insertelement <2 x float> undef, float %6, i64 0 + %8 = tail call i32 @air.get_height_texture_2d(%struct._texture_2d_t addrspace(1)* nocapture readonly %1, i32 0) #23, !alias.scope !233, !noalias !236 + %9 = tail call fast float @air.convert.f.f32.u.i32(i32 %8) #19 + %10 = insertelement <2 x float> %7, float %9, i64 1 + %11 = extractelement <3 x i32> %3, i64 0 + %12 = insertelement <2 x i32> undef, i32 %11, i64 0 + %13 = extractelement <3 x i32> %3, i64 1 + %14 = extractelement <3 x i32> %3, i64 2 + %15 = mul i32 %5, %14 + %16 = add i32 %15, %13 + %17 = insertelement <2 x i32> %12, i32 %16, i64 1 + %18 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %17) #19 + %19 = fadd fast <2 x float> %18, + %20 = fdiv fast <2 x float> %19, %10 + %21 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* nocapture readonly %2, <2 x float> %20, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !238 + %22 = extractvalue { <4 x float>, i8 } %21, 0 + tail call void @air.write_texture_2d.v4f32(%struct._texture_2d_t addrspace(1)* nocapture %1, <2 x i32> %17, <4 x float> %22, i32 0, i32 2) #21, !alias.scope !233, !noalias !236 ret void } @@ -409,97 +433,97 @@ define void @sample_down_layers(%struct._texture_2d_t addrspace(1)* %0, %struct. define void @wide_bindings(i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %1, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %2, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %3, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %4, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %5, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %6, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %7, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %8, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %9, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %10, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %11, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %12, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %13, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %14, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %15, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %16, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %17, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %18, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %19, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %20, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %21, i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %22, i32 addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %23, i32 noundef %24) local_unnamed_addr #0 { %26 = zext i32 %24 to i64 %27 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %26 - %28 = load i32, i32 addrspace(1)* %27, align 4, !tbaa !147, !alias.scope !232, !noalias !235 + %28 = load i32, i32 addrspace(1)* %27, align 4, !tbaa !148, !alias.scope !239, !noalias !242 %29 = mul i32 %28, 3 %30 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %26 - %31 = load i32, i32 addrspace(1)* %30, align 4, !tbaa !147, !alias.scope !259, !noalias !260 + %31 = load i32, i32 addrspace(1)* %30, align 4, !tbaa !148, !alias.scope !266, !noalias !267 %32 = add i32 %29, %31 %33 = mul i32 %32, 3 %34 = getelementptr inbounds i32, i32 addrspace(1)* %2, i64 %26 - %35 = load i32, i32 addrspace(1)* %34, align 4, !tbaa !147, !alias.scope !261, !noalias !262 + %35 = load i32, i32 addrspace(1)* %34, align 4, !tbaa !148, !alias.scope !268, !noalias !269 %36 = add i32 %33, %35 %37 = mul i32 %36, 3 %38 = getelementptr inbounds i32, i32 addrspace(1)* %3, i64 %26 - %39 = load i32, i32 addrspace(1)* %38, align 4, !tbaa !147, !alias.scope !263, !noalias !264 + %39 = load i32, i32 addrspace(1)* %38, align 4, !tbaa !148, !alias.scope !270, !noalias !271 %40 = add i32 %37, %39 %41 = mul i32 %40, 3 %42 = getelementptr inbounds i32, i32 addrspace(1)* %4, i64 %26 - %43 = load i32, i32 addrspace(1)* %42, align 4, !tbaa !147, !alias.scope !265, !noalias !266 + %43 = load i32, i32 addrspace(1)* %42, align 4, !tbaa !148, !alias.scope !272, !noalias !273 %44 = add i32 %41, %43 %45 = mul i32 %44, 3 %46 = getelementptr inbounds i32, i32 addrspace(1)* %5, i64 %26 - %47 = load i32, i32 addrspace(1)* %46, align 4, !tbaa !147, !alias.scope !267, !noalias !268 + %47 = load i32, i32 addrspace(1)* %46, align 4, !tbaa !148, !alias.scope !274, !noalias !275 %48 = add i32 %45, %47 %49 = mul i32 %48, 3 %50 = getelementptr inbounds i32, i32 addrspace(1)* %6, i64 %26 - %51 = load i32, i32 addrspace(1)* %50, align 4, !tbaa !147, !alias.scope !269, !noalias !270 + %51 = load i32, i32 addrspace(1)* %50, align 4, !tbaa !148, !alias.scope !276, !noalias !277 %52 = add i32 %49, %51 %53 = mul i32 %52, 3 %54 = getelementptr inbounds i32, i32 addrspace(1)* %7, i64 %26 - %55 = load i32, i32 addrspace(1)* %54, align 4, !tbaa !147, !alias.scope !271, !noalias !272 + %55 = load i32, i32 addrspace(1)* %54, align 4, !tbaa !148, !alias.scope !278, !noalias !279 %56 = add i32 %53, %55 %57 = mul i32 %56, 3 %58 = getelementptr inbounds i32, i32 addrspace(1)* %8, i64 %26 - %59 = load i32, i32 addrspace(1)* %58, align 4, !tbaa !147, !alias.scope !273, !noalias !274 + %59 = load i32, i32 addrspace(1)* %58, align 4, !tbaa !148, !alias.scope !280, !noalias !281 %60 = add i32 %57, %59 %61 = mul i32 %60, 3 %62 = getelementptr inbounds i32, i32 addrspace(1)* %9, i64 %26 - %63 = load i32, i32 addrspace(1)* %62, align 4, !tbaa !147, !alias.scope !275, !noalias !276 + %63 = load i32, i32 addrspace(1)* %62, align 4, !tbaa !148, !alias.scope !282, !noalias !283 %64 = add i32 %61, %63 %65 = mul i32 %64, 3 %66 = getelementptr inbounds i32, i32 addrspace(1)* %10, i64 %26 - %67 = load i32, i32 addrspace(1)* %66, align 4, !tbaa !147, !alias.scope !277, !noalias !278 + %67 = load i32, i32 addrspace(1)* %66, align 4, !tbaa !148, !alias.scope !284, !noalias !285 %68 = add i32 %65, %67 %69 = mul i32 %68, 3 %70 = getelementptr inbounds i32, i32 addrspace(1)* %11, i64 %26 - %71 = load i32, i32 addrspace(1)* %70, align 4, !tbaa !147, !alias.scope !279, !noalias !280 + %71 = load i32, i32 addrspace(1)* %70, align 4, !tbaa !148, !alias.scope !286, !noalias !287 %72 = add i32 %69, %71 %73 = mul i32 %72, 3 %74 = getelementptr inbounds i32, i32 addrspace(1)* %12, i64 %26 - %75 = load i32, i32 addrspace(1)* %74, align 4, !tbaa !147, !alias.scope !281, !noalias !282 + %75 = load i32, i32 addrspace(1)* %74, align 4, !tbaa !148, !alias.scope !288, !noalias !289 %76 = add i32 %73, %75 %77 = mul i32 %76, 3 %78 = getelementptr inbounds i32, i32 addrspace(1)* %13, i64 %26 - %79 = load i32, i32 addrspace(1)* %78, align 4, !tbaa !147, !alias.scope !283, !noalias !284 + %79 = load i32, i32 addrspace(1)* %78, align 4, !tbaa !148, !alias.scope !290, !noalias !291 %80 = add i32 %77, %79 %81 = mul i32 %80, 3 %82 = getelementptr inbounds i32, i32 addrspace(1)* %14, i64 %26 - %83 = load i32, i32 addrspace(1)* %82, align 4, !tbaa !147, !alias.scope !285, !noalias !286 + %83 = load i32, i32 addrspace(1)* %82, align 4, !tbaa !148, !alias.scope !292, !noalias !293 %84 = add i32 %81, %83 %85 = mul i32 %84, 3 %86 = getelementptr inbounds i32, i32 addrspace(1)* %15, i64 %26 - %87 = load i32, i32 addrspace(1)* %86, align 4, !tbaa !147, !alias.scope !287, !noalias !288 + %87 = load i32, i32 addrspace(1)* %86, align 4, !tbaa !148, !alias.scope !294, !noalias !295 %88 = add i32 %85, %87 %89 = mul i32 %88, 3 %90 = getelementptr inbounds i32, i32 addrspace(1)* %16, i64 %26 - %91 = load i32, i32 addrspace(1)* %90, align 4, !tbaa !147, !alias.scope !289, !noalias !290 + %91 = load i32, i32 addrspace(1)* %90, align 4, !tbaa !148, !alias.scope !296, !noalias !297 %92 = add i32 %89, %91 %93 = mul i32 %92, 3 %94 = getelementptr inbounds i32, i32 addrspace(1)* %17, i64 %26 - %95 = load i32, i32 addrspace(1)* %94, align 4, !tbaa !147, !alias.scope !291, !noalias !292 + %95 = load i32, i32 addrspace(1)* %94, align 4, !tbaa !148, !alias.scope !298, !noalias !299 %96 = add i32 %93, %95 %97 = mul i32 %96, 3 %98 = getelementptr inbounds i32, i32 addrspace(1)* %18, i64 %26 - %99 = load i32, i32 addrspace(1)* %98, align 4, !tbaa !147, !alias.scope !293, !noalias !294 + %99 = load i32, i32 addrspace(1)* %98, align 4, !tbaa !148, !alias.scope !300, !noalias !301 %100 = add i32 %97, %99 %101 = mul i32 %100, 3 %102 = getelementptr inbounds i32, i32 addrspace(1)* %19, i64 %26 - %103 = load i32, i32 addrspace(1)* %102, align 4, !tbaa !147, !alias.scope !295, !noalias !296 + %103 = load i32, i32 addrspace(1)* %102, align 4, !tbaa !148, !alias.scope !302, !noalias !303 %104 = add i32 %101, %103 %105 = mul i32 %104, 3 %106 = getelementptr inbounds i32, i32 addrspace(1)* %20, i64 %26 - %107 = load i32, i32 addrspace(1)* %106, align 4, !tbaa !147, !alias.scope !297, !noalias !298 + %107 = load i32, i32 addrspace(1)* %106, align 4, !tbaa !148, !alias.scope !304, !noalias !305 %108 = add i32 %105, %107 %109 = mul i32 %108, 3 %110 = getelementptr inbounds i32, i32 addrspace(1)* %21, i64 %26 - %111 = load i32, i32 addrspace(1)* %110, align 4, !tbaa !147, !alias.scope !299, !noalias !300 + %111 = load i32, i32 addrspace(1)* %110, align 4, !tbaa !148, !alias.scope !306, !noalias !307 %112 = add i32 %109, %111 %113 = mul i32 %112, 3 %114 = getelementptr inbounds i32, i32 addrspace(1)* %22, i64 %26 - %115 = load i32, i32 addrspace(1)* %114, align 4, !tbaa !147, !alias.scope !301, !noalias !302 + %115 = load i32, i32 addrspace(1)* %114, align 4, !tbaa !148, !alias.scope !308, !noalias !309 %116 = add i32 %113, %115 %117 = getelementptr inbounds i32, i32 addrspace(1)* %23, i64 %26 - store i32 %116, i32 addrspace(1)* %117, align 4, !tbaa !147, !alias.scope !303, !noalias !304 + store i32 %116, i32 addrspace(1)* %117, align 4, !tbaa !148, !alias.scope !310, !noalias !311 ret void } @@ -509,11 +533,11 @@ define void @wave_store(i32 addrspace(1)* nocapture noundef writeonly "air-buffe %5 = mul i32 %4, 5600 %6 = extractelement <2 x i32> %2, i64 0 %7 = add i32 %5, %6 - %8 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !147, !alias.scope !305, !noalias !308 + %8 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !148, !alias.scope !312, !noalias !315 %9 = add i32 %8, %7 %10 = zext i32 %7 to i64 %11 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %10 - store i32 %9, i32 addrspace(1)* %11, align 4, !tbaa !147, !alias.scope !308, !noalias !305 + store i32 %9, i32 addrspace(1)* %11, align 4, !tbaa !148, !alias.scope !315, !noalias !312 ret void } @@ -527,15 +551,15 @@ define void @signed_zero_products(<4 x float> addrspace(1)* nocapture noundef wr %9 = fneg fast float %8 %10 = insertelement <4 x float> , float %5, i64 0 %11 = insertelement <4 x float> %10, float %9, i64 1 - %12 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !147, !alias.scope !310, !noalias !313 + %12 = load i32, i32 addrspace(2)* %1, align 4, !tbaa !148, !alias.scope !317, !noalias !320 %13 = icmp eq i32 %12, 0 br i1 %13, label %21, label %14 14: ; preds = %3 - %15 = load float, float addrspace(2)* @_ZL13positive_zero, align 4, !tbaa !154 + %15 = load float, float addrspace(2)* @_ZL13positive_zero, align 4, !tbaa !155 %16 = insertelement <4 x float> poison, float %15, i64 0 %17 = shufflevector <4 x float> %16, <4 x float> poison, <4 x i32> zeroinitializer - %18 = load float, float addrspace(2)* @_ZL13negative_zero, align 4, !tbaa !154 + %18 = load float, float addrspace(2)* @_ZL13negative_zero, align 4, !tbaa !155 %19 = insertelement <4 x float> poison, float %18, i64 0 %20 = shufflevector <4 x float> %19, <4 x float> poison, <4 x i32> zeroinitializer br label %27 @@ -546,7 +570,7 @@ define void @signed_zero_products(<4 x float> addrspace(1)* nocapture noundef wr %24 = fadd <4 x float> %22, %23 %25 = zext i32 %2 to i64 %26 = getelementptr inbounds <4 x float>, <4 x float> addrspace(1)* %0, i64 %25 - store <4 x float> %24, <4 x float> addrspace(1)* %26, align 16, !tbaa !129, !alias.scope !313, !noalias !310 + store <4 x float> %24, <4 x float> addrspace(1)* %26, align 16, !tbaa !130, !alias.scope !320, !noalias !317 ret void 27: ; preds = %14, %27 @@ -560,14 +584,14 @@ define void @signed_zero_products(<4 x float> addrspace(1)* nocapture noundef wr %35 = tail call fast <4 x float> @air.fma.v4f32(<4 x float> %28, <4 x float> , <4 x float> ) #19 %36 = add nuw i32 %30, 1 %37 = icmp eq i32 %36, %12 - br i1 %37, label %21, label %27, !llvm.loop !315 + br i1 %37, label %21, label %27, !llvm.loop !322 } ; Function Attrs: convergent mustprogress nounwind define void @vote_loop(i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, <2 x i32> addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #11 { %5 = zext i32 %2 to i64 %6 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %5 - %7 = load i32, i32 addrspace(1)* %6, align 4, !tbaa !147, !alias.scope !316, !noalias !319 + %7 = load i32, i32 addrspace(1)* %6, align 4, !tbaa !148, !alias.scope !323, !noalias !326 %8 = icmp eq i32 %7, 0 br i1 %8, label %9, label %14 @@ -576,7 +600,7 @@ define void @vote_loop(i32 addrspace(1)* nocapture noundef readonly "air-buffer- %11 = insertelement <2 x i32> undef, i32 %10, i64 0 %12 = insertelement <2 x i32> %11, i32 %3, i64 1 %13 = getelementptr inbounds <2 x i32>, <2 x i32> addrspace(1)* %1, i64 %5 - store <2 x i32> %12, <2 x i32> addrspace(1)* %13, align 8, !tbaa !129, !alias.scope !319, !noalias !316 + store <2 x i32> %12, <2 x i32> addrspace(1)* %13, align 8, !tbaa !130, !alias.scope !326, !noalias !323 ret void 14: ; preds = %4, %14 @@ -587,17 +611,17 @@ define void @vote_loop(i32 addrspace(1)* nocapture noundef readonly "air-buffer- tail call void @air.simdgroup.barrier(i32 0, i32 4) #20 %19 = add nuw i32 %15, 1 %20 = icmp eq i32 %19, %7 - br i1 %20, label %9, label %14, !llvm.loop !321 + br i1 %20, label %9, label %14, !llvm.loop !328 } ; Function Attrs: convergent mustprogress nounwind define void @group_sums(i32 addrspace(1)* nocapture noundef readonly "air-buffer-no-alias" %0, i32 addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, i32 addrspace(3)* nocapture noundef "air-buffer-no-alias" %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #11 { %8 = zext i32 %6 to i64 %9 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %8 - %10 = load i32, i32 addrspace(1)* %9, align 4, !tbaa !147, !alias.scope !322, !noalias !325 + %10 = load i32, i32 addrspace(1)* %9, align 4, !tbaa !148, !alias.scope !329, !noalias !332 %11 = zext i32 %3 to i64 %12 = getelementptr inbounds i32, i32 addrspace(3)* %2, i64 %11 - store i32 %10, i32 addrspace(3)* %12, align 4, !tbaa !147, !alias.scope !328, !noalias !329 + store i32 %10, i32 addrspace(3)* %12, align 4, !tbaa !148, !alias.scope !335, !noalias !336 tail call void @air.wg.barrier(i32 2, i32 1) #20 %13 = icmp ult i32 %4, 2 br i1 %13, label %14, label %16 @@ -616,22 +640,22 @@ define void @group_sums(i32 addrspace(1)* nocapture noundef readonly "air-buffer %21 = add i32 %18, %3 %22 = zext i32 %21 to i64 %23 = getelementptr inbounds i32, i32 addrspace(3)* %2, i64 %22 - %24 = load i32, i32 addrspace(3)* %23, align 4, !tbaa !147, !alias.scope !328, !noalias !329 - %25 = load i32, i32 addrspace(3)* %12, align 4, !tbaa !147, !alias.scope !328, !noalias !329 + %24 = load i32, i32 addrspace(3)* %23, align 4, !tbaa !148, !alias.scope !335, !noalias !336 + %25 = load i32, i32 addrspace(3)* %12, align 4, !tbaa !148, !alias.scope !335, !noalias !336 %26 = add i32 %25, %24 - store i32 %26, i32 addrspace(3)* %12, align 4, !tbaa !147, !alias.scope !328, !noalias !329 + store i32 %26, i32 addrspace(3)* %12, align 4, !tbaa !148, !alias.scope !335, !noalias !336 br label %27 27: ; preds = %20, %16 tail call void @air.wg.barrier(i32 2, i32 1) #20 %28 = icmp ult i32 %17, 4 - br i1 %28, label %14, label %16, !llvm.loop !330 + br i1 %28, label %14, label %16, !llvm.loop !337 29: ; preds = %14 %30 = zext i32 %5 to i64 %31 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %30 - %32 = load i32, i32 addrspace(3)* %2, align 4, !tbaa !147, !alias.scope !328, !noalias !329 - store i32 %32, i32 addrspace(1)* %31, align 4, !tbaa !147, !alias.scope !331, !noalias !332 + %32 = load i32, i32 addrspace(3)* %2, align 4, !tbaa !148, !alias.scope !335, !noalias !336 + store i32 %32, i32 addrspace(1)* %31, align 4, !tbaa !148, !alias.scope !338, !noalias !339 br label %33 33: ; preds = %29, %14 @@ -645,7 +669,7 @@ define void @constant_reads(<4 x i32> addrspace(2)* nocapture noundef readonly " 4: ; preds = %7 %5 = zext i32 %2 to i64 %6 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %5 - store i32 %23, i32 addrspace(1)* %6, align 4, !tbaa !147, !alias.scope !333, !noalias !336 + store i32 %23, i32 addrspace(1)* %6, align 4, !tbaa !148, !alias.scope !340, !noalias !343 ret void 7: ; preds = %3, %7 @@ -656,7 +680,7 @@ define void @constant_reads(<4 x i32> addrspace(2)* nocapture noundef readonly " %12 = and i32 %11, 4095 %13 = zext i32 %12 to i64 %14 = getelementptr inbounds <4 x i32>, <4 x i32> addrspace(2)* %0, i64 %13 - %15 = load <4 x i32>, <4 x i32> addrspace(2)* %14, align 16, !tbaa !129, !alias.scope !336, !noalias !333 + %15 = load <4 x i32>, <4 x i32> addrspace(2)* %14, align 16, !tbaa !130, !alias.scope !343, !noalias !340 %16 = extractelement <4 x i32> %15, i64 0 %17 = xor i32 %16, %8 %18 = extractelement <4 x i32> %15, i64 1 @@ -667,7 +691,7 @@ define void @constant_reads(<4 x i32> addrspace(2)* nocapture noundef readonly " %23 = add i32 %19, %22 %24 = add nuw nsw i32 %9, 1 %25 = icmp eq i32 %24, 64 - br i1 %25, label %4, label %7, !llvm.loop !338 + br i1 %25, label %4, label %7, !llvm.loop !345 } ; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn @@ -711,10 +735,10 @@ declare { <4 x float>, i8 } @air.sample_texture_2d.v4f32(%struct._texture_2d_t a ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn writeonly define internal void @_GLOBAL__sub_I__() #18 section "air.static_init" { - %1 = load float, float addrspace(2)* @_Z13positive_zero.MTL_FC_INIT_0_f, align 4, !tbaa !154 - store float %1, float addrspace(2)* @_ZL13positive_zero, align 4, !tbaa !154 - %2 = load float, float addrspace(2)* @_Z13negative_zero.MTL_FC_INIT_1_f, align 4, !tbaa !154 - store float %2, float addrspace(2)* @_ZL13negative_zero, align 4, !tbaa !154 + %1 = load float, float addrspace(2)* @_Z13positive_zero.MTL_FC_INIT_0_f, align 4, !tbaa !155 + store float %1, float addrspace(2)* @_ZL13positive_zero, align 4, !tbaa !155 + %2 = load float, float addrspace(2)* @_Z13negative_zero.MTL_FC_INIT_1_f, align 4, !tbaa !155 + store float %2, float addrspace(2)* @_ZL13negative_zero, align 4, !tbaa !155 ret void } @@ -745,13 +769,13 @@ attributes #23 = { argmemonly nounwind readonly willreturn } attributes #24 = { argmemonly convergent nounwind readonly willreturn } !llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} -!air.kernel = !{!9, !15, !21, !25, !30, !40, !44, !48, !51, !55, !60, !65, !68, !71, !98, !101, !104, !109, !117} -!air.compile_options = !{!120, !121, !122} -!air.function_constants = !{!123, !124} -!air.sampler_states = !{!125} -!llvm.ident = !{!126} -!air.version = !{!127} -!air.language_version = !{!128} +!air.kernel = !{!9, !15, !21, !25, !30, !40, !44, !48, !51, !55, !60, !65, !68, !71, !72, !99, !102, !105, !110, !118} +!air.compile_options = !{!121, !122, !123} +!air.function_constants = !{!124, !125} +!air.sampler_states = !{!126} +!llvm.ident = !{!127} +!air.version = !{!128} +!air.language_version = !{!129} !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 2]} !1 = !{i32 1, !"wchar_size", i32 4} @@ -824,271 +848,278 @@ attributes #24 = { argmemonly convergent nounwind readonly willreturn } !68 = !{void (%struct._texture_2d_t addrspace(1)*, %struct._texture_2d_t addrspace(1)*, %struct._sampler_t addrspace(2)*, <3 x i32>)* @sample_down_layers, !10, !69} !69 = !{!62, !63, !64, !70} !70 = !{i32 3, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint3", !"air.arg_name", !"position"} -!71 = !{void (i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32)* @wide_bindings, !10, !72} -!72 = !{!73, !74, !75, !76, !77, !78, !79, !80, !81, !82, !83, !84, !85, !86, !87, !88, !89, !90, !91, !92, !93, !94, !95, !96, !97} -!73 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b0"} -!74 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b1"} -!75 = !{i32 2, !"air.buffer", !"air.location_index", i32 2, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b2"} -!76 = !{i32 3, !"air.buffer", !"air.location_index", i32 3, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b3"} -!77 = !{i32 4, !"air.buffer", !"air.location_index", i32 4, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b4"} -!78 = !{i32 5, !"air.buffer", !"air.location_index", i32 5, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b5"} -!79 = !{i32 6, !"air.buffer", !"air.location_index", i32 6, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b6"} -!80 = !{i32 7, !"air.buffer", !"air.location_index", i32 7, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b7"} -!81 = !{i32 8, !"air.buffer", !"air.location_index", i32 8, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b8"} -!82 = !{i32 9, !"air.buffer", !"air.location_index", i32 9, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b9"} -!83 = !{i32 10, !"air.buffer", !"air.location_index", i32 10, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b10"} -!84 = !{i32 11, !"air.buffer", !"air.location_index", i32 11, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b11"} -!85 = !{i32 12, !"air.buffer", !"air.location_index", i32 12, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b12"} -!86 = !{i32 13, !"air.buffer", !"air.location_index", i32 13, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b13"} -!87 = !{i32 14, !"air.buffer", !"air.location_index", i32 14, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b14"} -!88 = !{i32 15, !"air.buffer", !"air.location_index", i32 15, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b15"} -!89 = !{i32 16, !"air.buffer", !"air.location_index", i32 16, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b16"} -!90 = !{i32 17, !"air.buffer", !"air.location_index", i32 17, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b17"} -!91 = !{i32 18, !"air.buffer", !"air.location_index", i32 18, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b18"} -!92 = !{i32 19, !"air.buffer", !"air.location_index", i32 19, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b19"} -!93 = !{i32 20, !"air.buffer", !"air.location_index", i32 20, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b20"} -!94 = !{i32 21, !"air.buffer", !"air.location_index", i32 21, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b21"} -!95 = !{i32 22, !"air.buffer", !"air.location_index", i32 22, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b22"} -!96 = !{i32 23, !"air.buffer", !"air.location_index", i32 23, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"destination"} -!97 = !{i32 24, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} -!98 = !{void (i32 addrspace(1)*, i32 addrspace(2)*, <2 x i32>)* @wave_store, !10, !99} -!99 = !{!50, !100, !67} -!100 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"base"} -!101 = !{void (<4 x float> addrspace(1)*, i32 addrspace(2)*, i32)* @signed_zero_products, !10, !102} -!102 = !{!103, !24, !14} -!103 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"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", !"destination"} -!104 = !{void (i32 addrspace(1)*, <2 x i32> addrspace(1)*, i32, i32)* @vote_loop, !10, !105} -!105 = !{!106, !107, !14, !108} -!106 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"steps"} -!107 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"uint2", !"air.arg_name", !"destination"} -!108 = !{i32 3, !"air.thread_index_in_simdgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"lane"} -!109 = !{void (i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(3)*, i32, i32, i32, i32)* @group_sums, !10, !110} -!110 = !{!27, !111, !112, !113, !114, !115, !116} -!111 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"sums"} -!112 = !{i32 2, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 3, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"scratch"} -!113 = !{i32 3, !"air.thread_position_in_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"at"} -!114 = !{i32 4, !"air.threads_per_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"size"} -!115 = !{i32 5, !"air.threadgroup_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"group"} -!116 = !{i32 6, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} -!117 = !{void (<4 x i32> addrspace(2)*, i32 addrspace(1)*, i32)* @constant_reads, !10, !118} -!118 = !{!119, !28, !14} -!119 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 16, !"air.arg_type_align_size", i32 16, !"air.arg_type_name", !"uint4", !"air.arg_name", !"table"} -!120 = !{!"air.compile.denorms_disable"} -!121 = !{!"air.compile.fast_math_enable"} -!122 = !{!"air.compile.framebuffer_fetch_enable"} -!123 = !{float addrspace(2)* @_Z13positive_zero.MTL_FC_INIT_0_f, !"float", !"positive_zero", i32 0} -!124 = !{float addrspace(2)* @_Z13negative_zero.MTL_FC_INIT_1_f, !"float", !"negative_zero", i32 1} -!125 = !{!"air.sampler_state", [2 x i64] addrspace(2)* @__air_sampler_state} -!126 = !{!"Apple metal version 32023.922 (metalfe-32023.922.4)"} -!127 = !{i32 2, i32 8, i32 0} -!128 = !{!"Metal", i32 4, i32 0, i32 0} -!129 = !{!130, !130, i64 0} -!130 = !{!"omnipotent char", !131, i64 0} -!131 = !{!"Simple C++ TBAA"} -!132 = !{!133} -!133 = distinct !{!133, !134, !"air-alias-scope-arg(0)"} -!134 = distinct !{!134, !"air-alias-scopes(copy_words)"} -!135 = !{!136} -!136 = distinct !{!136, !134, !"air-alias-scope-arg(1)"} -!137 = !{!138} -!138 = distinct !{!138, !139, !"air-alias-scope-arg(0)"} -!139 = distinct !{!139, !"air-alias-scopes(scale_offset)"} -!140 = !{!141, !142} -!141 = distinct !{!141, !139, !"air-alias-scope-arg(1)"} -!142 = distinct !{!142, !139, !"air-alias-scope-arg(2)"} -!143 = !{!142} -!144 = !{!138, !141} -!145 = !{!141} -!146 = !{!138, !142} -!147 = !{!148, !148, i64 0} -!148 = !{!"int", !130, i64 0} -!149 = !{!150} -!150 = distinct !{!150, !151, !"air-alias-scope-arg(1)"} -!151 = distinct !{!151, !"air-alias-scopes(fma_chains)"} -!152 = !{!153} -!153 = distinct !{!153, !151, !"air-alias-scope-arg(0)"} -!154 = !{!155, !155, i64 0} -!155 = !{!"float", !130, i64 0} -!156 = distinct !{!156, !157} -!157 = !{!"llvm.loop.mustprogress"} -!158 = !{!159} -!159 = distinct !{!159, !160, !"air-alias-scope-arg(0)"} -!160 = distinct !{!160, !"air-alias-scopes(block_scan)"} -!161 = !{!162} -!162 = distinct !{!162, !160, !"air-alias-scope-arg(1)"} -!163 = distinct !{!163, !157} -!164 = !{!165} -!165 = distinct !{!165, !166, !"air-alias-scope-arg(2)"} -!166 = distinct !{!166, !"air-alias-scopes(reduce_sum)"} -!167 = !{!168, !169} -!168 = distinct !{!168, !166, !"air-alias-scope-arg(0)"} -!169 = distinct !{!169, !166, !"air-alias-scope-arg(1)"} -!170 = !{!168} -!171 = !{!169, !165} -!172 = distinct !{!172, !157} -!173 = distinct !{!173, !157} -!174 = !{!169} -!175 = !{!168, !165} -!176 = !{!177} -!177 = distinct !{!177, !178, !"air-alias-scope-arg(2)"} -!178 = distinct !{!178, !"air-alias-scopes(binomial3x3)"} -!179 = !{!180, !181} -!180 = distinct !{!180, !178, !"air-alias-scope-arg(0)"} -!181 = distinct !{!181, !178, !"air-alias-scope-arg(1)"} -!182 = !{!181} -!183 = !{!180, !177} -!184 = distinct !{!184, !157} -!185 = !{!180} -!186 = !{!181, !177} -!187 = distinct !{!187, !157} -!188 = !{!189} -!189 = distinct !{!189, !190, !"air-alias-scope-arg(0)"} -!190 = distinct !{!190, !"air-alias-scopes(lcg_step)"} -!191 = !{!192} -!192 = distinct !{!192, !190, !"air-alias-scope-arg(1)"} -!193 = !{!194} -!194 = distinct !{!194, !195, !"air-alias-scope-arg(1)"} -!195 = distinct !{!195, !"air-alias-scopes(narrow_mix)"} -!196 = !{!197} -!197 = distinct !{!197, !195, !"air-alias-scope-arg(0)"} -!198 = distinct !{!198, !157} -!199 = !{!200} -!200 = distinct !{!200, !201, !"air-alias-scope-arg(1)"} -!201 = distinct !{!201, !"air-alias-scopes(texels_in)"} -!202 = !{!203, !204} -!203 = distinct !{!203, !201, !"air-alias-scope-arg(0)"} -!204 = distinct !{!204, !201, !"air-alias-scope-textures"} -!205 = !{!203} -!206 = !{!200, !204} -!207 = !{!204} -!208 = !{!203, !200} -!209 = !{!210} -!210 = distinct !{!210, !211, !"air-alias-scope-arg(2)"} -!211 = distinct !{!211, !"air-alias-scopes(texels_out)"} -!212 = !{!213, !214} -!213 = distinct !{!213, !211, !"air-alias-scope-textures"} -!214 = distinct !{!214, !211, !"air-alias-scope-arg(1)"} -!215 = !{!214} -!216 = !{!213, !210} -!217 = !{!218} -!218 = distinct !{!218, !219, !"air-alias-scope-textures"} -!219 = distinct !{!219, !"air-alias-scopes(sample_down)"} -!220 = !{!221} -!221 = distinct !{!221, !219, !"air-alias-scope-samplers"} -!222 = !{!218, !221} -!223 = !{!224} -!224 = distinct !{!224, !225, !"air-alias-scope-textures"} -!225 = distinct !{!225, !"air-alias-scopes(sample_up)"} -!226 = !{!227} -!227 = distinct !{!227, !228, !"air-alias-scope-textures"} -!228 = distinct !{!228, !"air-alias-scopes(sample_down_layers)"} -!229 = !{!230} -!230 = distinct !{!230, !228, !"air-alias-scope-samplers"} -!231 = !{!227, !230} -!232 = !{!233} -!233 = distinct !{!233, !234, !"air-alias-scope-arg(0)"} -!234 = distinct !{!234, !"air-alias-scopes(wide_bindings)"} -!235 = !{!236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!236 = distinct !{!236, !234, !"air-alias-scope-arg(1)"} -!237 = distinct !{!237, !234, !"air-alias-scope-arg(2)"} -!238 = distinct !{!238, !234, !"air-alias-scope-arg(3)"} -!239 = distinct !{!239, !234, !"air-alias-scope-arg(4)"} -!240 = distinct !{!240, !234, !"air-alias-scope-arg(5)"} -!241 = distinct !{!241, !234, !"air-alias-scope-arg(6)"} -!242 = distinct !{!242, !234, !"air-alias-scope-arg(7)"} -!243 = distinct !{!243, !234, !"air-alias-scope-arg(8)"} -!244 = distinct !{!244, !234, !"air-alias-scope-arg(9)"} -!245 = distinct !{!245, !234, !"air-alias-scope-arg(10)"} -!246 = distinct !{!246, !234, !"air-alias-scope-arg(11)"} -!247 = distinct !{!247, !234, !"air-alias-scope-arg(12)"} -!248 = distinct !{!248, !234, !"air-alias-scope-arg(13)"} -!249 = distinct !{!249, !234, !"air-alias-scope-arg(14)"} -!250 = distinct !{!250, !234, !"air-alias-scope-arg(15)"} -!251 = distinct !{!251, !234, !"air-alias-scope-arg(16)"} -!252 = distinct !{!252, !234, !"air-alias-scope-arg(17)"} -!253 = distinct !{!253, !234, !"air-alias-scope-arg(18)"} -!254 = distinct !{!254, !234, !"air-alias-scope-arg(19)"} -!255 = distinct !{!255, !234, !"air-alias-scope-arg(20)"} -!256 = distinct !{!256, !234, !"air-alias-scope-arg(21)"} -!257 = distinct !{!257, !234, !"air-alias-scope-arg(22)"} -!258 = distinct !{!258, !234, !"air-alias-scope-arg(23)"} -!259 = !{!236} -!260 = !{!233, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!261 = !{!237} -!262 = !{!233, !236, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!263 = !{!238} -!264 = !{!233, !236, !237, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!265 = !{!239} -!266 = !{!233, !236, !237, !238, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!267 = !{!240} -!268 = !{!233, !236, !237, !238, !239, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!269 = !{!241} -!270 = !{!233, !236, !237, !238, !239, !240, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!271 = !{!242} -!272 = !{!233, !236, !237, !238, !239, !240, !241, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!273 = !{!243} -!274 = !{!233, !236, !237, !238, !239, !240, !241, !242, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!275 = !{!244} -!276 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!277 = !{!245} -!278 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!279 = !{!246} -!280 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!281 = !{!247} -!282 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!283 = !{!248} -!284 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!285 = !{!249} -!286 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!287 = !{!250} -!288 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !251, !252, !253, !254, !255, !256, !257, !258} -!289 = !{!251} -!290 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !252, !253, !254, !255, !256, !257, !258} -!291 = !{!252} -!292 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !253, !254, !255, !256, !257, !258} -!293 = !{!253} -!294 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !254, !255, !256, !257, !258} -!295 = !{!254} -!296 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !255, !256, !257, !258} -!297 = !{!255} -!298 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !256, !257, !258} -!299 = !{!256} -!300 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !257, !258} -!301 = !{!257} -!302 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !258} -!303 = !{!258} -!304 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257} -!305 = !{!306} -!306 = distinct !{!306, !307, !"air-alias-scope-arg(1)"} -!307 = distinct !{!307, !"air-alias-scopes(wave_store)"} -!308 = !{!309} -!309 = distinct !{!309, !307, !"air-alias-scope-arg(0)"} -!310 = !{!311} -!311 = distinct !{!311, !312, !"air-alias-scope-arg(1)"} -!312 = distinct !{!312, !"air-alias-scopes(signed_zero_products)"} -!313 = !{!314} -!314 = distinct !{!314, !312, !"air-alias-scope-arg(0)"} -!315 = distinct !{!315, !157} -!316 = !{!317} -!317 = distinct !{!317, !318, !"air-alias-scope-arg(0)"} -!318 = distinct !{!318, !"air-alias-scopes(vote_loop)"} -!319 = !{!320} -!320 = distinct !{!320, !318, !"air-alias-scope-arg(1)"} -!321 = distinct !{!321, !157} -!322 = !{!323} -!323 = distinct !{!323, !324, !"air-alias-scope-arg(0)"} -!324 = distinct !{!324, !"air-alias-scopes(group_sums)"} -!325 = !{!326, !327} -!326 = distinct !{!326, !324, !"air-alias-scope-arg(1)"} -!327 = distinct !{!327, !324, !"air-alias-scope-arg(2)"} -!328 = !{!327} -!329 = !{!323, !326} -!330 = distinct !{!330, !157} -!331 = !{!326} -!332 = !{!323, !327} -!333 = !{!334} -!334 = distinct !{!334, !335, !"air-alias-scope-arg(1)"} -!335 = distinct !{!335, !"air-alias-scopes(constant_reads)"} -!336 = !{!337} -!337 = distinct !{!337, !335, !"air-alias-scope-arg(0)"} -!338 = distinct !{!338, !157} +!71 = !{void (%struct._texture_2d_t addrspace(1)*, %struct._texture_2d_t addrspace(1)*, %struct._sampler_t addrspace(2)*, <3 x i32>)* @sample_down_distinct, !10, !69} +!72 = !{void (i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32)* @wide_bindings, !10, !73} +!73 = !{!74, !75, !76, !77, !78, !79, !80, !81, !82, !83, !84, !85, !86, !87, !88, !89, !90, !91, !92, !93, !94, !95, !96, !97, !98} +!74 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b0"} +!75 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b1"} +!76 = !{i32 2, !"air.buffer", !"air.location_index", i32 2, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b2"} +!77 = !{i32 3, !"air.buffer", !"air.location_index", i32 3, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b3"} +!78 = !{i32 4, !"air.buffer", !"air.location_index", i32 4, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b4"} +!79 = !{i32 5, !"air.buffer", !"air.location_index", i32 5, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b5"} +!80 = !{i32 6, !"air.buffer", !"air.location_index", i32 6, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b6"} +!81 = !{i32 7, !"air.buffer", !"air.location_index", i32 7, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b7"} +!82 = !{i32 8, !"air.buffer", !"air.location_index", i32 8, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b8"} +!83 = !{i32 9, !"air.buffer", !"air.location_index", i32 9, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b9"} +!84 = !{i32 10, !"air.buffer", !"air.location_index", i32 10, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b10"} +!85 = !{i32 11, !"air.buffer", !"air.location_index", i32 11, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b11"} +!86 = !{i32 12, !"air.buffer", !"air.location_index", i32 12, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b12"} +!87 = !{i32 13, !"air.buffer", !"air.location_index", i32 13, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b13"} +!88 = !{i32 14, !"air.buffer", !"air.location_index", i32 14, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b14"} +!89 = !{i32 15, !"air.buffer", !"air.location_index", i32 15, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b15"} +!90 = !{i32 16, !"air.buffer", !"air.location_index", i32 16, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b16"} +!91 = !{i32 17, !"air.buffer", !"air.location_index", i32 17, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b17"} +!92 = !{i32 18, !"air.buffer", !"air.location_index", i32 18, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b18"} +!93 = !{i32 19, !"air.buffer", !"air.location_index", i32 19, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b19"} +!94 = !{i32 20, !"air.buffer", !"air.location_index", i32 20, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b20"} +!95 = !{i32 21, !"air.buffer", !"air.location_index", i32 21, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b21"} +!96 = !{i32 22, !"air.buffer", !"air.location_index", i32 22, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b22"} +!97 = !{i32 23, !"air.buffer", !"air.location_index", i32 23, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"destination"} +!98 = !{i32 24, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} +!99 = !{void (i32 addrspace(1)*, i32 addrspace(2)*, <2 x i32>)* @wave_store, !10, !100} +!100 = !{!50, !101, !67} +!101 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"base"} +!102 = !{void (<4 x float> addrspace(1)*, i32 addrspace(2)*, i32)* @signed_zero_products, !10, !103} +!103 = !{!104, !24, !14} +!104 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"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", !"destination"} +!105 = !{void (i32 addrspace(1)*, <2 x i32> addrspace(1)*, i32, i32)* @vote_loop, !10, !106} +!106 = !{!107, !108, !14, !109} +!107 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"steps"} +!108 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"uint2", !"air.arg_name", !"destination"} +!109 = !{i32 3, !"air.thread_index_in_simdgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"lane"} +!110 = !{void (i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(3)*, i32, i32, i32, i32)* @group_sums, !10, !111} +!111 = !{!27, !112, !113, !114, !115, !116, !117} +!112 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"sums"} +!113 = !{i32 2, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 3, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"scratch"} +!114 = !{i32 3, !"air.thread_position_in_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"at"} +!115 = !{i32 4, !"air.threads_per_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"size"} +!116 = !{i32 5, !"air.threadgroup_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"group"} +!117 = !{i32 6, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} +!118 = !{void (<4 x i32> addrspace(2)*, i32 addrspace(1)*, i32)* @constant_reads, !10, !119} +!119 = !{!120, !28, !14} +!120 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 16, !"air.arg_type_align_size", i32 16, !"air.arg_type_name", !"uint4", !"air.arg_name", !"table"} +!121 = !{!"air.compile.denorms_disable"} +!122 = !{!"air.compile.fast_math_enable"} +!123 = !{!"air.compile.framebuffer_fetch_enable"} +!124 = !{float addrspace(2)* @_Z13positive_zero.MTL_FC_INIT_0_f, !"float", !"positive_zero", i32 0} +!125 = !{float addrspace(2)* @_Z13negative_zero.MTL_FC_INIT_1_f, !"float", !"negative_zero", i32 1} +!126 = !{!"air.sampler_state", [2 x i64] addrspace(2)* @__air_sampler_state} +!127 = !{!"Apple metal version 32023.922 (metalfe-32023.922.4)"} +!128 = !{i32 2, i32 8, i32 0} +!129 = !{!"Metal", i32 4, i32 0, i32 0} +!130 = !{!131, !131, i64 0} +!131 = !{!"omnipotent char", !132, i64 0} +!132 = !{!"Simple C++ TBAA"} +!133 = !{!134} +!134 = distinct !{!134, !135, !"air-alias-scope-arg(0)"} +!135 = distinct !{!135, !"air-alias-scopes(copy_words)"} +!136 = !{!137} +!137 = distinct !{!137, !135, !"air-alias-scope-arg(1)"} +!138 = !{!139} +!139 = distinct !{!139, !140, !"air-alias-scope-arg(0)"} +!140 = distinct !{!140, !"air-alias-scopes(scale_offset)"} +!141 = !{!142, !143} +!142 = distinct !{!142, !140, !"air-alias-scope-arg(1)"} +!143 = distinct !{!143, !140, !"air-alias-scope-arg(2)"} +!144 = !{!143} +!145 = !{!139, !142} +!146 = !{!142} +!147 = !{!139, !143} +!148 = !{!149, !149, i64 0} +!149 = !{!"int", !131, i64 0} +!150 = !{!151} +!151 = distinct !{!151, !152, !"air-alias-scope-arg(1)"} +!152 = distinct !{!152, !"air-alias-scopes(fma_chains)"} +!153 = !{!154} +!154 = distinct !{!154, !152, !"air-alias-scope-arg(0)"} +!155 = !{!156, !156, i64 0} +!156 = !{!"float", !131, i64 0} +!157 = distinct !{!157, !158} +!158 = !{!"llvm.loop.mustprogress"} +!159 = !{!160} +!160 = distinct !{!160, !161, !"air-alias-scope-arg(0)"} +!161 = distinct !{!161, !"air-alias-scopes(block_scan)"} +!162 = !{!163} +!163 = distinct !{!163, !161, !"air-alias-scope-arg(1)"} +!164 = distinct !{!164, !158} +!165 = !{!166} +!166 = distinct !{!166, !167, !"air-alias-scope-arg(2)"} +!167 = distinct !{!167, !"air-alias-scopes(reduce_sum)"} +!168 = !{!169, !170} +!169 = distinct !{!169, !167, !"air-alias-scope-arg(0)"} +!170 = distinct !{!170, !167, !"air-alias-scope-arg(1)"} +!171 = !{!169} +!172 = !{!170, !166} +!173 = distinct !{!173, !158} +!174 = distinct !{!174, !158} +!175 = !{!170} +!176 = !{!169, !166} +!177 = !{!178} +!178 = distinct !{!178, !179, !"air-alias-scope-arg(2)"} +!179 = distinct !{!179, !"air-alias-scopes(binomial3x3)"} +!180 = !{!181, !182} +!181 = distinct !{!181, !179, !"air-alias-scope-arg(0)"} +!182 = distinct !{!182, !179, !"air-alias-scope-arg(1)"} +!183 = !{!182} +!184 = !{!181, !178} +!185 = distinct !{!185, !158} +!186 = !{!181} +!187 = !{!182, !178} +!188 = distinct !{!188, !158} +!189 = !{!190} +!190 = distinct !{!190, !191, !"air-alias-scope-arg(0)"} +!191 = distinct !{!191, !"air-alias-scopes(lcg_step)"} +!192 = !{!193} +!193 = distinct !{!193, !191, !"air-alias-scope-arg(1)"} +!194 = !{!195} +!195 = distinct !{!195, !196, !"air-alias-scope-arg(1)"} +!196 = distinct !{!196, !"air-alias-scopes(narrow_mix)"} +!197 = !{!198} +!198 = distinct !{!198, !196, !"air-alias-scope-arg(0)"} +!199 = distinct !{!199, !158} +!200 = !{!201} +!201 = distinct !{!201, !202, !"air-alias-scope-arg(1)"} +!202 = distinct !{!202, !"air-alias-scopes(texels_in)"} +!203 = !{!204, !205} +!204 = distinct !{!204, !202, !"air-alias-scope-arg(0)"} +!205 = distinct !{!205, !202, !"air-alias-scope-textures"} +!206 = !{!204} +!207 = !{!201, !205} +!208 = !{!205} +!209 = !{!204, !201} +!210 = !{!211} +!211 = distinct !{!211, !212, !"air-alias-scope-arg(2)"} +!212 = distinct !{!212, !"air-alias-scopes(texels_out)"} +!213 = !{!214, !215} +!214 = distinct !{!214, !212, !"air-alias-scope-textures"} +!215 = distinct !{!215, !212, !"air-alias-scope-arg(1)"} +!216 = !{!215} +!217 = !{!214, !211} +!218 = !{!219} +!219 = distinct !{!219, !220, !"air-alias-scope-textures"} +!220 = distinct !{!220, !"air-alias-scopes(sample_down)"} +!221 = !{!222} +!222 = distinct !{!222, !220, !"air-alias-scope-samplers"} +!223 = !{!219, !222} +!224 = !{!225} +!225 = distinct !{!225, !226, !"air-alias-scope-textures"} +!226 = distinct !{!226, !"air-alias-scopes(sample_up)"} +!227 = !{!228} +!228 = distinct !{!228, !229, !"air-alias-scope-textures"} +!229 = distinct !{!229, !"air-alias-scopes(sample_down_layers)"} +!230 = !{!231} +!231 = distinct !{!231, !229, !"air-alias-scope-samplers"} +!232 = !{!228, !231} +!233 = !{!234} +!234 = distinct !{!234, !235, !"air-alias-scope-textures"} +!235 = distinct !{!235, !"air-alias-scopes(sample_down_distinct)"} +!236 = !{!237} +!237 = distinct !{!237, !235, !"air-alias-scope-samplers"} +!238 = !{!234, !237} +!239 = !{!240} +!240 = distinct !{!240, !241, !"air-alias-scope-arg(0)"} +!241 = distinct !{!241, !"air-alias-scopes(wide_bindings)"} +!242 = !{!243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!243 = distinct !{!243, !241, !"air-alias-scope-arg(1)"} +!244 = distinct !{!244, !241, !"air-alias-scope-arg(2)"} +!245 = distinct !{!245, !241, !"air-alias-scope-arg(3)"} +!246 = distinct !{!246, !241, !"air-alias-scope-arg(4)"} +!247 = distinct !{!247, !241, !"air-alias-scope-arg(5)"} +!248 = distinct !{!248, !241, !"air-alias-scope-arg(6)"} +!249 = distinct !{!249, !241, !"air-alias-scope-arg(7)"} +!250 = distinct !{!250, !241, !"air-alias-scope-arg(8)"} +!251 = distinct !{!251, !241, !"air-alias-scope-arg(9)"} +!252 = distinct !{!252, !241, !"air-alias-scope-arg(10)"} +!253 = distinct !{!253, !241, !"air-alias-scope-arg(11)"} +!254 = distinct !{!254, !241, !"air-alias-scope-arg(12)"} +!255 = distinct !{!255, !241, !"air-alias-scope-arg(13)"} +!256 = distinct !{!256, !241, !"air-alias-scope-arg(14)"} +!257 = distinct !{!257, !241, !"air-alias-scope-arg(15)"} +!258 = distinct !{!258, !241, !"air-alias-scope-arg(16)"} +!259 = distinct !{!259, !241, !"air-alias-scope-arg(17)"} +!260 = distinct !{!260, !241, !"air-alias-scope-arg(18)"} +!261 = distinct !{!261, !241, !"air-alias-scope-arg(19)"} +!262 = distinct !{!262, !241, !"air-alias-scope-arg(20)"} +!263 = distinct !{!263, !241, !"air-alias-scope-arg(21)"} +!264 = distinct !{!264, !241, !"air-alias-scope-arg(22)"} +!265 = distinct !{!265, !241, !"air-alias-scope-arg(23)"} +!266 = !{!243} +!267 = !{!240, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!268 = !{!244} +!269 = !{!240, !243, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!270 = !{!245} +!271 = !{!240, !243, !244, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!272 = !{!246} +!273 = !{!240, !243, !244, !245, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!274 = !{!247} +!275 = !{!240, !243, !244, !245, !246, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!276 = !{!248} +!277 = !{!240, !243, !244, !245, !246, !247, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!278 = !{!249} +!279 = !{!240, !243, !244, !245, !246, !247, !248, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!280 = !{!250} +!281 = !{!240, !243, !244, !245, !246, !247, !248, !249, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!282 = !{!251} +!283 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!284 = !{!252} +!285 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!286 = !{!253} +!287 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!288 = !{!254} +!289 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!290 = !{!255} +!291 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!292 = !{!256} +!293 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!294 = !{!257} +!295 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !258, !259, !260, !261, !262, !263, !264, !265} +!296 = !{!258} +!297 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !259, !260, !261, !262, !263, !264, !265} +!298 = !{!259} +!299 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !260, !261, !262, !263, !264, !265} +!300 = !{!260} +!301 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !261, !262, !263, !264, !265} +!302 = !{!261} +!303 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !262, !263, !264, !265} +!304 = !{!262} +!305 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !263, !264, !265} +!306 = !{!263} +!307 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !264, !265} +!308 = !{!264} +!309 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !265} +!310 = !{!265} +!311 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264} +!312 = !{!313} +!313 = distinct !{!313, !314, !"air-alias-scope-arg(1)"} +!314 = distinct !{!314, !"air-alias-scopes(wave_store)"} +!315 = !{!316} +!316 = distinct !{!316, !314, !"air-alias-scope-arg(0)"} +!317 = !{!318} +!318 = distinct !{!318, !319, !"air-alias-scope-arg(1)"} +!319 = distinct !{!319, !"air-alias-scopes(signed_zero_products)"} +!320 = !{!321} +!321 = distinct !{!321, !319, !"air-alias-scope-arg(0)"} +!322 = distinct !{!322, !158} +!323 = !{!324} +!324 = distinct !{!324, !325, !"air-alias-scope-arg(0)"} +!325 = distinct !{!325, !"air-alias-scopes(vote_loop)"} +!326 = !{!327} +!327 = distinct !{!327, !325, !"air-alias-scope-arg(1)"} +!328 = distinct !{!328, !158} +!329 = !{!330} +!330 = distinct !{!330, !331, !"air-alias-scope-arg(0)"} +!331 = distinct !{!331, !"air-alias-scopes(group_sums)"} +!332 = !{!333, !334} +!333 = distinct !{!333, !331, !"air-alias-scope-arg(1)"} +!334 = distinct !{!334, !331, !"air-alias-scope-arg(2)"} +!335 = !{!334} +!336 = !{!330, !333} +!337 = distinct !{!337, !158} +!338 = !{!333} +!339 = !{!330, !334} +!340 = !{!341} +!341 = distinct !{!341, !342, !"air-alias-scope-arg(1)"} +!342 = distinct !{!342, !"air-alias-scopes(constant_reads)"} +!343 = !{!344} +!344 = distinct !{!344, !342, !"air-alias-scope-arg(0)"} +!345 = distinct !{!345, !158} diff --git a/crates/metal2vulkan-validation/fixtures/public/harness/workloads.ll b/crates/metal2vulkan-validation/fixtures/public/harness/workloads.ll index 908487c5a..f9938ba27 100644 --- a/crates/metal2vulkan-validation/fixtures/public/harness/workloads.ll +++ b/crates/metal2vulkan-validation/fixtures/public/harness/workloads.ll @@ -17,9 +17,9 @@ target triple = "air64_v28-apple-macosx26.0.0" define void @copy_words(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, i32 noundef %2) local_unnamed_addr #0 { %4 = zext i32 %2 to i64 %5 = getelementptr inbounds <4 x i32>, ptr addrspace(1) %0, i64 %4 - %6 = load <4 x i32>, ptr addrspace(1) %5, align 16, !tbaa !129, !alias.scope !132, !noalias !135 + %6 = load <4 x i32>, ptr addrspace(1) %5, align 16, !tbaa !130, !alias.scope !133, !noalias !136 %7 = getelementptr inbounds <4 x i32>, ptr addrspace(1) %1, i64 %4 - store <4 x i32> %6, ptr addrspace(1) %7, align 16, !tbaa !129, !alias.scope !135, !noalias !132 + store <4 x i32> %6, ptr addrspace(1) %7, align 16, !tbaa !130, !alias.scope !136, !noalias !133 ret void } @@ -27,14 +27,14 @@ define void @copy_words(ptr addrspace(1) noundef readonly captures(none) "air-bu define void @scale_offset(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(2) noundef readonly align 8 captures(none) dereferenceable(8) "air-buffer-no-alias" %2, i32 noundef %3) local_unnamed_addr #0 { %5 = zext i32 %3 to i64 %6 = getelementptr inbounds <4 x float>, ptr addrspace(1) %0, i64 %5 - %7 = load <4 x float>, ptr addrspace(1) %6, align 16, !tbaa !129, !alias.scope !137, !noalias !140 - %8 = load <2 x float>, ptr addrspace(2) %2, align 8, !alias.scope !143, !noalias !144 + %7 = load <4 x float>, ptr addrspace(1) %6, align 16, !tbaa !130, !alias.scope !138, !noalias !141 + %8 = load <2 x float>, ptr addrspace(2) %2, align 8, !alias.scope !144, !noalias !145 %9 = shufflevector <2 x float> %8, <2 x float> undef, <4 x i32> zeroinitializer %10 = fmul fast <4 x float> %9, %7 %11 = shufflevector <2 x float> %8, <2 x float> undef, <4 x i32> %12 = fadd fast <4 x float> %10, %11 %13 = getelementptr inbounds <4 x float>, ptr addrspace(1) %1, i64 %5 - store <4 x float> %12, ptr addrspace(1) %13, align 16, !tbaa !129, !alias.scope !145, !noalias !146 + store <4 x float> %12, ptr addrspace(1) %13, align 16, !tbaa !130, !alias.scope !146, !noalias !147 ret void } @@ -47,7 +47,7 @@ define void @fma_chains(ptr addrspace(1) noundef writeonly captures(none) "air-b %8 = and i32 %7, 31 %9 = tail call fast float @air.convert.f.f32.u.i32(i32 %8) #19 %10 = fmul fast float %9, 3.125000e-02 - %11 = load i32, ptr addrspace(2) %1, align 4, !tbaa !147, !alias.scope !149, !noalias !152 + %11 = load i32, ptr addrspace(2) %1, align 4, !tbaa !148, !alias.scope !150, !noalias !153 %12 = icmp eq i32 %11, 0 br i1 %12, label %13, label %19 @@ -57,7 +57,7 @@ define void @fma_chains(ptr addrspace(1) noundef writeonly captures(none) "air-b %16 = fadd fast float %15, %14 %17 = zext i32 %2 to i64 %18 = getelementptr inbounds float, ptr addrspace(1) %0, i64 %17 - store float %16, ptr addrspace(1) %18, align 4, !tbaa !154, !alias.scope !152, !noalias !149 + store float %16, ptr addrspace(1) %18, align 4, !tbaa !155, !alias.scope !153, !noalias !150 ret void 19: ; preds = %19, %3 @@ -70,7 +70,7 @@ define void @fma_chains(ptr addrspace(1) noundef writeonly captures(none) "air-b %26 = tail call fast float @air.fma.f32(float %21, float 8.750000e-01, float %25) #19 %27 = add nuw i32 %20, 1 %28 = icmp eq i32 %27, %11 - br i1 %28, label %13, label %19, !llvm.loop !156 + br i1 %28, label %13, label %19, !llvm.loop !157 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) @@ -80,16 +80,16 @@ declare float @air.convert.f.f32.u.i32(i32) local_unnamed_addr #2 define void @block_scan(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 { %5 = zext i32 %2 to i64 %6 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %5 - %7 = load i32, ptr addrspace(1) %6, align 4, !tbaa !147, !alias.scope !158, !noalias !161 + %7 = load i32, ptr addrspace(1) %6, align 4, !tbaa !148, !alias.scope !159, !noalias !162 %8 = zext i32 %3 to i64 %9 = getelementptr inbounds [256 x i32], ptr addrspace(3) @_ZZ10block_scanPU9MTLdeviceKjPU9MTLdevicejjjE4sums, i64 0, i64 %8 - store i32 %7, ptr addrspace(3) %9, align 4, !tbaa !147 + store i32 %7, ptr addrspace(3) %9, align 4, !tbaa !148 tail call void @air.wg.barrier(i32 2, i32 1) #20 br label %12 10: ; preds = %21 %11 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %5 - store i32 %23, ptr addrspace(1) %11, align 4, !tbaa !147, !alias.scope !161, !noalias !158 + store i32 %23, ptr addrspace(1) %11, align 4, !tbaa !148, !alias.scope !162, !noalias !159 ret void 12: ; preds = %21, %4 @@ -102,23 +102,23 @@ define void @block_scan(ptr addrspace(1) noundef readonly captures(none) "air-bu %17 = sub i32 %3, %14 %18 = zext i32 %17 to i64 %19 = getelementptr inbounds [256 x i32], ptr addrspace(3) @_ZZ10block_scanPU9MTLdeviceKjPU9MTLdevicejjjE4sums, i64 0, i64 %18 - %20 = load i32, ptr addrspace(3) %19, align 4, !tbaa !147 + %20 = load i32, ptr addrspace(3) %19, align 4, !tbaa !148 br label %21 21: ; preds = %16, %12 %22 = phi i32 [ %20, %16 ], [ 0, %12 ] tail call void @air.wg.barrier(i32 2, i32 1) #20 %23 = add i32 %22, %13 - store i32 %23, ptr addrspace(3) %9, align 4, !tbaa !147 + store i32 %23, ptr addrspace(3) %9, align 4, !tbaa !148 tail call void @air.wg.barrier(i32 2, i32 1) #20 %24 = shl nuw nsw i32 %14, 1 %25 = icmp ult i32 %14, 128 - br i1 %25, label %12, label %10, !llvm.loop !163 + br i1 %25, label %12, label %10, !llvm.loop !164 } ; Function Attrs: convergent mustprogress nounwind define void @reduce_sum(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(2) noundef readonly align 8 captures(none) dereferenceable(8) "air-buffer-no-alias" %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9) local_unnamed_addr #3 { - %11 = load <2 x i32>, ptr addrspace(2) %2, align 8, !alias.scope !164, !noalias !167 + %11 = load <2 x i32>, ptr addrspace(2) %2, align 8, !alias.scope !165, !noalias !168 %12 = extractelement <2 x i32> %11, i64 1 %13 = mul i32 %12, %3 %14 = add i32 %13, %12 @@ -139,16 +139,16 @@ define void @reduce_sum(ptr addrspace(1) noundef readonly captures(none) "air-bu %25 = phi i32 [ %29, %23 ], [ 0, %10 ] %26 = zext i32 %24 to i64 %27 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %26 - %28 = load i32, ptr addrspace(1) %27, align 4, !tbaa !147, !alias.scope !170, !noalias !171 + %28 = load i32, ptr addrspace(1) %27, align 4, !tbaa !148, !alias.scope !171, !noalias !172 %29 = add i32 %28, %25 %30 = add i32 %24, %5 %31 = icmp ult i32 %30, %16 - br i1 %31, label %23, label %19, !llvm.loop !172 + br i1 %31, label %23, label %19, !llvm.loop !173 32: ; preds = %19 %33 = zext i32 %7 to i64 %34 = getelementptr inbounds [256 x i32], ptr addrspace(3) @_ZZ10reduce_sumPU9MTLdeviceKjPU9MTLdevicejRU11MTLconstantKDv2_jjjjjjjjE7partial, i64 0, i64 %33 - store i32 %21, ptr addrspace(3) %34, align 4, !tbaa !147 + store i32 %21, ptr addrspace(3) %34, align 4, !tbaa !148 br label %35 35: ; preds = %32, %19 @@ -170,16 +170,16 @@ define void @reduce_sum(ptr addrspace(1) noundef readonly captures(none) "air-bu %44 = phi i32 [ %48, %42 ], [ 0, %37 ] %45 = zext i32 %43 to i64 %46 = getelementptr inbounds [256 x i32], ptr addrspace(3) @_ZZ10reduce_sumPU9MTLdeviceKjPU9MTLdevicejRU11MTLconstantKDv2_jjjjjjjjE7partial, i64 0, i64 %45 - %47 = load i32, ptr addrspace(3) %46, align 4, !tbaa !147 + %47 = load i32, ptr addrspace(3) %46, align 4, !tbaa !148 %48 = add i32 %47, %44 %49 = add i32 %43, %9 %50 = icmp ult i32 %49, %8 - br i1 %50, label %42, label %39, !llvm.loop !173 + br i1 %50, label %42, label %39, !llvm.loop !174 51: ; preds = %39 %52 = zext i32 %3 to i64 %53 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %52 - store i32 %41, ptr addrspace(1) %53, align 4, !tbaa !147, !alias.scope !174, !noalias !175 + store i32 %41, ptr addrspace(1) %53, align 4, !tbaa !148, !alias.scope !175, !noalias !176 br label %54 54: ; preds = %51, %39, %35 @@ -189,7 +189,7 @@ define void @reduce_sum(ptr addrspace(1) noundef readonly captures(none) "air-bu ; Function Attrs: mustprogress nofree nosync nounwind memory(argmem: readwrite) define void @binomial3x3(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(2) noundef readonly align 8 captures(none) dereferenceable(8) "air-buffer-no-alias" %2, <2 x i32> noundef %3) local_unnamed_addr #4 { %5 = extractelement <2 x i32> %3, i64 1 - %6 = load <2 x i32>, ptr addrspace(2) %2, align 8, !alias.scope !176, !noalias !179 + %6 = load <2 x i32>, ptr addrspace(2) %2, align 8, !alias.scope !177, !noalias !180 %7 = extractelement <2 x i32> %6, i64 1 %8 = add nsw i32 %7, -1 %9 = extractelement <2 x i32> %3, i64 0 @@ -203,7 +203,7 @@ define void @binomial3x3(ptr addrspace(1) noundef readonly captures(none) "air-b %15 = add i32 %14, %9 %16 = zext i32 %15 to i64 %17 = getelementptr inbounds <4 x float>, ptr addrspace(1) %1, i64 %16 - store <4 x float> %13, ptr addrspace(1) %17, align 16, !tbaa !129, !alias.scope !182, !noalias !183 + store <4 x float> %13, ptr addrspace(1) %17, align 16, !tbaa !130, !alias.scope !183, !noalias !184 ret void 18: ; preds = %26, %4 @@ -219,7 +219,7 @@ define void @binomial3x3(ptr addrspace(1) noundef readonly captures(none) "air-b 26: ; preds = %29 %27 = add nsw i32 %20, 1 %28 = icmp eq i32 %27, 2 - br i1 %28, label %12, label %18, !llvm.loop !184 + br i1 %28, label %12, label %18, !llvm.loop !185 29: ; preds = %29, %18 %30 = phi <4 x float> [ %19, %18 ], [ %44, %29 ] @@ -232,25 +232,25 @@ define void @binomial3x3(ptr addrspace(1) noundef readonly captures(none) "air-b %37 = add i32 %33, %25 %38 = zext i32 %37 to i64 %39 = getelementptr inbounds <4 x float>, ptr addrspace(1) %0, i64 %38 - %40 = load <4 x float>, ptr addrspace(1) %39, align 16, !tbaa !129, !alias.scope !185, !noalias !186 + %40 = load <4 x float>, ptr addrspace(1) %39, align 16, !tbaa !130, !alias.scope !186, !noalias !187 %41 = insertelement <4 x float> poison, float %36, i64 0 %42 = shufflevector <4 x float> %41, <4 x float> poison, <4 x i32> zeroinitializer %43 = fmul fast <4 x float> %42, %40 %44 = fadd fast <4 x float> %43, %30 %45 = add nsw i32 %31, 1 %46 = icmp eq i32 %45, 2 - br i1 %46, label %26, label %29, !llvm.loop !187 + br i1 %46, label %26, label %29, !llvm.loop !188 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) define void @lcg_step(ptr addrspace(1) noundef captures(none) "air-buffer-no-alias" %0, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %1, i32 noundef %2) local_unnamed_addr #0 { %4 = zext i32 %2 to i64 %5 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %4 - %6 = load i32, ptr addrspace(1) %5, align 4, !tbaa !147, !alias.scope !188, !noalias !191 + %6 = load i32, ptr addrspace(1) %5, align 4, !tbaa !148, !alias.scope !189, !noalias !192 %7 = mul i32 %6, 1664525 - %8 = load i32, ptr addrspace(2) %1, align 4, !tbaa !147, !alias.scope !191, !noalias !188 + %8 = load i32, ptr addrspace(2) %1, align 4, !tbaa !148, !alias.scope !192, !noalias !189 %9 = add i32 %7, %8 - store i32 %9, ptr addrspace(1) %5, align 4, !tbaa !147, !alias.scope !188, !noalias !191 + store i32 %9, ptr addrspace(1) %5, align 4, !tbaa !148, !alias.scope !189, !noalias !192 ret void } @@ -261,7 +261,7 @@ define void @narrow_mix(ptr addrspace(1) noundef writeonly captures(none) "air-b %6 = xor i16 %4, 23130 %7 = trunc i32 %2 to i8 %8 = lshr i32 %2, 3 - %9 = load i32, ptr addrspace(2) %1, align 4, !tbaa !147, !alias.scope !193, !noalias !196 + %9 = load i32, ptr addrspace(2) %1, align 4, !tbaa !148, !alias.scope !194, !noalias !197 %10 = icmp eq i32 %9, 0 br i1 %10, label %11, label %27 @@ -281,7 +281,7 @@ define void @narrow_mix(ptr addrspace(1) noundef writeonly captures(none) "air-b %24 = xor i32 %21, %23 %25 = zext i32 %2 to i64 %26 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %25 - store i32 %24, ptr addrspace(1) %26, align 4, !tbaa !147, !alias.scope !196, !noalias !193 + store i32 %24, ptr addrspace(1) %26, align 4, !tbaa !148, !alias.scope !197, !noalias !194 ret void 27: ; preds = %27, %3 @@ -306,20 +306,20 @@ define void @narrow_mix(ptr addrspace(1) noundef writeonly captures(none) "air-b %46 = add nsw i32 %45, %42 %47 = add nuw i32 %28, 1 %48 = icmp eq i32 %47, %9 - br i1 %48, label %11, label %27, !llvm.loop !198 + br i1 %48, label %11, label %27, !llvm.loop !199 } ; Function Attrs: mustprogress nounwind willreturn define void @texels_in(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %1, ptr addrspace(1) %2, <2 x i32> noundef %3) local_unnamed_addr #6 { %5 = extractelement <2 x i32> %3, i64 1 - %6 = load i32, ptr addrspace(2) %1, align 4, !tbaa !147, !alias.scope !199, !noalias !202 + %6 = load i32, ptr addrspace(2) %1, align 4, !tbaa !148, !alias.scope !200, !noalias !203 %7 = mul i32 %6, %5 %8 = extractelement <2 x i32> %3, i64 0 %9 = add i32 %7, %8 %10 = zext i32 %9 to i64 %11 = getelementptr inbounds <4 x float>, ptr addrspace(1) %0, i64 %10 - %12 = load <4 x float>, ptr addrspace(1) %11, align 16, !tbaa !129, !alias.scope !205, !noalias !206 - tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %2, <2 x i32> %3, <4 x float> %12, i32 0, i32 2) #21, !alias.scope !207, !noalias !208 + %12 = load <4 x float>, ptr addrspace(1) %11, align 16, !tbaa !130, !alias.scope !206, !noalias !207 + tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %2, <2 x i32> %3, <4 x float> %12, i32 0, i32 2) #21, !alias.scope !208, !noalias !209 ret void } @@ -329,30 +329,30 @@ define void @texels_out(ptr addrspace(1) readonly captures(none) %0, ptr addrspa %6 = tail call { <4 x float>, i8 } @air.read_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) %5, <2 x i32> %3, <2 x i32> zeroinitializer, i32 0, i32 1) #23 %7 = extractvalue { <4 x float>, i8 } %6, 0 %8 = extractelement <2 x i32> %3, i64 1 - %9 = load i32, ptr addrspace(2) %2, align 4, !tbaa !147, !alias.scope !209, !noalias !212 + %9 = load i32, ptr addrspace(2) %2, align 4, !tbaa !148, !alias.scope !210, !noalias !213 %10 = mul i32 %9, %8 %11 = extractelement <2 x i32> %3, i64 0 %12 = add i32 %10, %11 %13 = zext i32 %12 to i64 %14 = getelementptr inbounds <4 x float>, ptr addrspace(1) %1, i64 %13 - store <4 x float> %7, ptr addrspace(1) %14, align 16, !tbaa !129, !alias.scope !215, !noalias !216 + store <4 x float> %7, ptr addrspace(1) %14, align 16, !tbaa !130, !alias.scope !216, !noalias !217 ret void } ; Function Attrs: convergent mustprogress nounwind willreturn define void @sample_down(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr addrspace(2) readonly captures(none) %2, <2 x i32> noundef %3) local_unnamed_addr #8 { - %5 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !217, !noalias !220 + %5 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !218, !noalias !221 %6 = tail call fast float @air.convert.f.f32.u.i32(i32 %5) #19 %7 = insertelement <2 x float> undef, float %6, i64 0 - %8 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !217, !noalias !220 + %8 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !218, !noalias !221 %9 = tail call fast float @air.convert.f.f32.u.i32(i32 %8) #19 %10 = insertelement <2 x float> %7, float %9, i64 1 %11 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %3) #19 %12 = fadd fast <2 x float> %11, splat (float 5.000000e-01) %13 = fdiv fast <2 x float> %12, %10 - %14 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) readonly captures(none) %2, <2 x float> %13, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !222 + %14 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) readonly captures(none) %2, <2 x float> %13, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !223 %15 = extractvalue { <4 x float>, i8 } %14, 0 - tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %3, <4 x float> %15, i32 0, i32 2) #21, !alias.scope !217, !noalias !220 + tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %3, <4 x float> %15, i32 0, i32 2) #21, !alias.scope !218, !noalias !221 ret void } @@ -361,10 +361,10 @@ declare <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32>) local_unnamed_addr # ; Function Attrs: convergent mustprogress nounwind willreturn define void @sample_up(ptr addrspace(1) %0, ptr addrspace(1) %1, <2 x i32> noundef %2) local_unnamed_addr #8 { - %4 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !223 + %4 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !224 %5 = tail call fast float @air.convert.f.f32.u.i32(i32 %4) #19 %6 = insertelement <2 x float> undef, float %5, i64 0 - %7 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !223 + %7 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !224 %8 = tail call fast float @air.convert.f.f32.u.i32(i32 %7) #19 %9 = insertelement <2 x float> %6, float %8, i64 1 %10 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %2) #19 @@ -372,15 +372,15 @@ define void @sample_up(ptr addrspace(1) %0, ptr addrspace(1) %1, <2 x i32> nound %12 = fdiv fast <2 x float> %11, %9 %13 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) readonly captures(none) @__air_sampler_state, <2 x float> %12, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24 %14 = extractvalue { <4 x float>, i8 } %13, 0 - tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %2, <4 x float> %14, i32 0, i32 2) #21, !alias.scope !223 + tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %2, <4 x float> %14, i32 0, i32 2) #21, !alias.scope !224 ret void } ; Function Attrs: convergent mustprogress nounwind willreturn define void @sample_down_layers(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr addrspace(2) readonly captures(none) %2, <3 x i32> noundef %3) local_unnamed_addr #8 { - %5 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %0, i32 0) #23, !alias.scope !226, !noalias !229 + %5 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %0, i32 0) #23, !alias.scope !227, !noalias !230 %6 = lshr i32 %5, 1 - %7 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !226, !noalias !229 + %7 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !227, !noalias !230 %8 = tail call fast float @air.convert.f.f32.u.i32(i32 %7) #19 %9 = insertelement <2 x float> undef, float %8, i64 0 %10 = tail call fast float @air.convert.f.f32.u.i32(i32 %6) #19 @@ -389,7 +389,7 @@ define void @sample_down_layers(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr ad %13 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %12) #19 %14 = fadd fast <2 x float> %13, splat (float 5.000000e-01) %15 = fdiv fast <2 x float> %14, %11 - %16 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) readonly captures(none) %2, <2 x float> %15, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !231 + %16 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) readonly captures(none) %2, <2 x float> %15, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !232 %17 = extractvalue { <4 x float>, i8 } %16, 0 %18 = extractelement <3 x i32> %3, i64 0 %19 = insertelement <2 x i32> undef, i32 %18, i64 0 @@ -398,7 +398,31 @@ define void @sample_down_layers(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr ad %22 = mul i32 %6, %21 %23 = add i32 %22, %20 %24 = insertelement <2 x i32> %19, i32 %23, i64 1 - tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %24, <4 x float> %17, i32 0, i32 2) #21, !alias.scope !226, !noalias !229 + tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %24, <4 x float> %17, i32 0, i32 2) #21, !alias.scope !227, !noalias !230 + ret void +} + +; Function Attrs: convergent mustprogress nounwind willreturn +define void @sample_down_distinct(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr addrspace(2) readonly captures(none) %2, <3 x i32> noundef %3) local_unnamed_addr #8 { + %5 = tail call i32 @air.get_width_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !233, !noalias !236 + %6 = tail call fast float @air.convert.f.f32.u.i32(i32 %5) #19 + %7 = insertelement <2 x float> undef, float %6, i64 0 + %8 = tail call i32 @air.get_height_texture_2d(ptr addrspace(1) readonly captures(none) %1, i32 0) #23, !alias.scope !233, !noalias !236 + %9 = tail call fast float @air.convert.f.f32.u.i32(i32 %8) #19 + %10 = insertelement <2 x float> %7, float %9, i64 1 + %11 = extractelement <3 x i32> %3, i64 0 + %12 = insertelement <2 x i32> undef, i32 %11, i64 0 + %13 = extractelement <3 x i32> %3, i64 1 + %14 = extractelement <3 x i32> %3, i64 2 + %15 = mul i32 %5, %14 + %16 = add i32 %15, %13 + %17 = insertelement <2 x i32> %12, i32 %16, i64 1 + %18 = tail call fast <2 x float> @air.convert.f.v2f32.u.v2i32(<2 x i32> %17) #19 + %19 = fadd fast <2 x float> %18, splat (float 5.000000e-01) + %20 = fdiv fast <2 x float> %19, %10 + %21 = tail call { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) readonly captures(none) %2, <2 x float> %20, i1 true, <2 x i32> zeroinitializer, i1 false, float 0.000000e+00, float 0.000000e+00, i32 0) #24, !alias.scope !238 + %22 = extractvalue { <4 x float>, i8 } %21, 0 + tail call void @air.write_texture_2d.v4f32(ptr addrspace(1) captures(none) %1, <2 x i32> %17, <4 x float> %22, i32 0, i32 2) #21, !alias.scope !233, !noalias !236 ret void } @@ -406,97 +430,97 @@ define void @sample_down_layers(ptr addrspace(1) %0, ptr addrspace(1) %1, ptr ad define void @wide_bindings(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %2, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %3, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %4, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %5, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %6, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %7, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %8, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %9, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %10, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %11, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %12, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %13, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %14, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %15, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %16, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %17, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %18, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %19, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %20, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %21, ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %22, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %23, i32 noundef %24) local_unnamed_addr #0 { %26 = zext i32 %24 to i64 %27 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %26 - %28 = load i32, ptr addrspace(1) %27, align 4, !tbaa !147, !alias.scope !232, !noalias !235 + %28 = load i32, ptr addrspace(1) %27, align 4, !tbaa !148, !alias.scope !239, !noalias !242 %29 = mul i32 %28, 3 %30 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %26 - %31 = load i32, ptr addrspace(1) %30, align 4, !tbaa !147, !alias.scope !259, !noalias !260 + %31 = load i32, ptr addrspace(1) %30, align 4, !tbaa !148, !alias.scope !266, !noalias !267 %32 = add i32 %29, %31 %33 = mul i32 %32, 3 %34 = getelementptr inbounds i32, ptr addrspace(1) %2, i64 %26 - %35 = load i32, ptr addrspace(1) %34, align 4, !tbaa !147, !alias.scope !261, !noalias !262 + %35 = load i32, ptr addrspace(1) %34, align 4, !tbaa !148, !alias.scope !268, !noalias !269 %36 = add i32 %33, %35 %37 = mul i32 %36, 3 %38 = getelementptr inbounds i32, ptr addrspace(1) %3, i64 %26 - %39 = load i32, ptr addrspace(1) %38, align 4, !tbaa !147, !alias.scope !263, !noalias !264 + %39 = load i32, ptr addrspace(1) %38, align 4, !tbaa !148, !alias.scope !270, !noalias !271 %40 = add i32 %37, %39 %41 = mul i32 %40, 3 %42 = getelementptr inbounds i32, ptr addrspace(1) %4, i64 %26 - %43 = load i32, ptr addrspace(1) %42, align 4, !tbaa !147, !alias.scope !265, !noalias !266 + %43 = load i32, ptr addrspace(1) %42, align 4, !tbaa !148, !alias.scope !272, !noalias !273 %44 = add i32 %41, %43 %45 = mul i32 %44, 3 %46 = getelementptr inbounds i32, ptr addrspace(1) %5, i64 %26 - %47 = load i32, ptr addrspace(1) %46, align 4, !tbaa !147, !alias.scope !267, !noalias !268 + %47 = load i32, ptr addrspace(1) %46, align 4, !tbaa !148, !alias.scope !274, !noalias !275 %48 = add i32 %45, %47 %49 = mul i32 %48, 3 %50 = getelementptr inbounds i32, ptr addrspace(1) %6, i64 %26 - %51 = load i32, ptr addrspace(1) %50, align 4, !tbaa !147, !alias.scope !269, !noalias !270 + %51 = load i32, ptr addrspace(1) %50, align 4, !tbaa !148, !alias.scope !276, !noalias !277 %52 = add i32 %49, %51 %53 = mul i32 %52, 3 %54 = getelementptr inbounds i32, ptr addrspace(1) %7, i64 %26 - %55 = load i32, ptr addrspace(1) %54, align 4, !tbaa !147, !alias.scope !271, !noalias !272 + %55 = load i32, ptr addrspace(1) %54, align 4, !tbaa !148, !alias.scope !278, !noalias !279 %56 = add i32 %53, %55 %57 = mul i32 %56, 3 %58 = getelementptr inbounds i32, ptr addrspace(1) %8, i64 %26 - %59 = load i32, ptr addrspace(1) %58, align 4, !tbaa !147, !alias.scope !273, !noalias !274 + %59 = load i32, ptr addrspace(1) %58, align 4, !tbaa !148, !alias.scope !280, !noalias !281 %60 = add i32 %57, %59 %61 = mul i32 %60, 3 %62 = getelementptr inbounds i32, ptr addrspace(1) %9, i64 %26 - %63 = load i32, ptr addrspace(1) %62, align 4, !tbaa !147, !alias.scope !275, !noalias !276 + %63 = load i32, ptr addrspace(1) %62, align 4, !tbaa !148, !alias.scope !282, !noalias !283 %64 = add i32 %61, %63 %65 = mul i32 %64, 3 %66 = getelementptr inbounds i32, ptr addrspace(1) %10, i64 %26 - %67 = load i32, ptr addrspace(1) %66, align 4, !tbaa !147, !alias.scope !277, !noalias !278 + %67 = load i32, ptr addrspace(1) %66, align 4, !tbaa !148, !alias.scope !284, !noalias !285 %68 = add i32 %65, %67 %69 = mul i32 %68, 3 %70 = getelementptr inbounds i32, ptr addrspace(1) %11, i64 %26 - %71 = load i32, ptr addrspace(1) %70, align 4, !tbaa !147, !alias.scope !279, !noalias !280 + %71 = load i32, ptr addrspace(1) %70, align 4, !tbaa !148, !alias.scope !286, !noalias !287 %72 = add i32 %69, %71 %73 = mul i32 %72, 3 %74 = getelementptr inbounds i32, ptr addrspace(1) %12, i64 %26 - %75 = load i32, ptr addrspace(1) %74, align 4, !tbaa !147, !alias.scope !281, !noalias !282 + %75 = load i32, ptr addrspace(1) %74, align 4, !tbaa !148, !alias.scope !288, !noalias !289 %76 = add i32 %73, %75 %77 = mul i32 %76, 3 %78 = getelementptr inbounds i32, ptr addrspace(1) %13, i64 %26 - %79 = load i32, ptr addrspace(1) %78, align 4, !tbaa !147, !alias.scope !283, !noalias !284 + %79 = load i32, ptr addrspace(1) %78, align 4, !tbaa !148, !alias.scope !290, !noalias !291 %80 = add i32 %77, %79 %81 = mul i32 %80, 3 %82 = getelementptr inbounds i32, ptr addrspace(1) %14, i64 %26 - %83 = load i32, ptr addrspace(1) %82, align 4, !tbaa !147, !alias.scope !285, !noalias !286 + %83 = load i32, ptr addrspace(1) %82, align 4, !tbaa !148, !alias.scope !292, !noalias !293 %84 = add i32 %81, %83 %85 = mul i32 %84, 3 %86 = getelementptr inbounds i32, ptr addrspace(1) %15, i64 %26 - %87 = load i32, ptr addrspace(1) %86, align 4, !tbaa !147, !alias.scope !287, !noalias !288 + %87 = load i32, ptr addrspace(1) %86, align 4, !tbaa !148, !alias.scope !294, !noalias !295 %88 = add i32 %85, %87 %89 = mul i32 %88, 3 %90 = getelementptr inbounds i32, ptr addrspace(1) %16, i64 %26 - %91 = load i32, ptr addrspace(1) %90, align 4, !tbaa !147, !alias.scope !289, !noalias !290 + %91 = load i32, ptr addrspace(1) %90, align 4, !tbaa !148, !alias.scope !296, !noalias !297 %92 = add i32 %89, %91 %93 = mul i32 %92, 3 %94 = getelementptr inbounds i32, ptr addrspace(1) %17, i64 %26 - %95 = load i32, ptr addrspace(1) %94, align 4, !tbaa !147, !alias.scope !291, !noalias !292 + %95 = load i32, ptr addrspace(1) %94, align 4, !tbaa !148, !alias.scope !298, !noalias !299 %96 = add i32 %93, %95 %97 = mul i32 %96, 3 %98 = getelementptr inbounds i32, ptr addrspace(1) %18, i64 %26 - %99 = load i32, ptr addrspace(1) %98, align 4, !tbaa !147, !alias.scope !293, !noalias !294 + %99 = load i32, ptr addrspace(1) %98, align 4, !tbaa !148, !alias.scope !300, !noalias !301 %100 = add i32 %97, %99 %101 = mul i32 %100, 3 %102 = getelementptr inbounds i32, ptr addrspace(1) %19, i64 %26 - %103 = load i32, ptr addrspace(1) %102, align 4, !tbaa !147, !alias.scope !295, !noalias !296 + %103 = load i32, ptr addrspace(1) %102, align 4, !tbaa !148, !alias.scope !302, !noalias !303 %104 = add i32 %101, %103 %105 = mul i32 %104, 3 %106 = getelementptr inbounds i32, ptr addrspace(1) %20, i64 %26 - %107 = load i32, ptr addrspace(1) %106, align 4, !tbaa !147, !alias.scope !297, !noalias !298 + %107 = load i32, ptr addrspace(1) %106, align 4, !tbaa !148, !alias.scope !304, !noalias !305 %108 = add i32 %105, %107 %109 = mul i32 %108, 3 %110 = getelementptr inbounds i32, ptr addrspace(1) %21, i64 %26 - %111 = load i32, ptr addrspace(1) %110, align 4, !tbaa !147, !alias.scope !299, !noalias !300 + %111 = load i32, ptr addrspace(1) %110, align 4, !tbaa !148, !alias.scope !306, !noalias !307 %112 = add i32 %109, %111 %113 = mul i32 %112, 3 %114 = getelementptr inbounds i32, ptr addrspace(1) %22, i64 %26 - %115 = load i32, ptr addrspace(1) %114, align 4, !tbaa !147, !alias.scope !301, !noalias !302 + %115 = load i32, ptr addrspace(1) %114, align 4, !tbaa !148, !alias.scope !308, !noalias !309 %116 = add i32 %113, %115 %117 = getelementptr inbounds i32, ptr addrspace(1) %23, i64 %26 - store i32 %116, ptr addrspace(1) %117, align 4, !tbaa !147, !alias.scope !303, !noalias !304 + store i32 %116, ptr addrspace(1) %117, align 4, !tbaa !148, !alias.scope !310, !noalias !311 ret void } @@ -506,11 +530,11 @@ define void @wave_store(ptr addrspace(1) noundef writeonly captures(none) "air-b %5 = mul i32 %4, 5600 %6 = extractelement <2 x i32> %2, i64 0 %7 = add i32 %5, %6 - %8 = load i32, ptr addrspace(2) %1, align 4, !tbaa !147, !alias.scope !305, !noalias !308 + %8 = load i32, ptr addrspace(2) %1, align 4, !tbaa !148, !alias.scope !312, !noalias !315 %9 = add i32 %8, %7 %10 = zext i32 %7 to i64 %11 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %10 - store i32 %9, ptr addrspace(1) %11, align 4, !tbaa !147, !alias.scope !308, !noalias !305 + store i32 %9, ptr addrspace(1) %11, align 4, !tbaa !148, !alias.scope !315, !noalias !312 ret void } @@ -524,15 +548,15 @@ define void @signed_zero_products(ptr addrspace(1) noundef writeonly captures(no %9 = fneg fast float %8 %10 = insertelement <4 x float> , float %5, i64 0 %11 = insertelement <4 x float> %10, float %9, i64 1 - %12 = load i32, ptr addrspace(2) %1, align 4, !tbaa !147, !alias.scope !310, !noalias !313 + %12 = load i32, ptr addrspace(2) %1, align 4, !tbaa !148, !alias.scope !317, !noalias !320 %13 = icmp eq i32 %12, 0 br i1 %13, label %21, label %14 14: ; preds = %3 - %15 = load float, ptr addrspace(2) @_ZL13positive_zero, align 4, !tbaa !154 + %15 = load float, ptr addrspace(2) @_ZL13positive_zero, align 4, !tbaa !155 %16 = insertelement <4 x float> poison, float %15, i64 0 %17 = shufflevector <4 x float> %16, <4 x float> poison, <4 x i32> zeroinitializer - %18 = load float, ptr addrspace(2) @_ZL13negative_zero, align 4, !tbaa !154 + %18 = load float, ptr addrspace(2) @_ZL13negative_zero, align 4, !tbaa !155 %19 = insertelement <4 x float> poison, float %18, i64 0 %20 = shufflevector <4 x float> %19, <4 x float> poison, <4 x i32> zeroinitializer br label %27 @@ -543,7 +567,7 @@ define void @signed_zero_products(ptr addrspace(1) noundef writeonly captures(no %24 = fadd <4 x float> %22, %23 %25 = zext i32 %2 to i64 %26 = getelementptr inbounds <4 x float>, ptr addrspace(1) %0, i64 %25 - store <4 x float> %24, ptr addrspace(1) %26, align 16, !tbaa !129, !alias.scope !313, !noalias !310 + store <4 x float> %24, ptr addrspace(1) %26, align 16, !tbaa !130, !alias.scope !320, !noalias !317 ret void 27: ; preds = %27, %14 @@ -557,14 +581,14 @@ define void @signed_zero_products(ptr addrspace(1) noundef writeonly captures(no %35 = tail call fast <4 x float> @air.fma.v4f32(<4 x float> %28, <4 x float> splat (float 9.687500e-01), <4 x float> splat (float 3.125000e-02)) #19 %36 = add nuw i32 %30, 1 %37 = icmp eq i32 %36, %12 - br i1 %37, label %21, label %27, !llvm.loop !315 + br i1 %37, label %21, label %27, !llvm.loop !322 } ; Function Attrs: convergent mustprogress nounwind define void @vote_loop(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #11 { %5 = zext i32 %2 to i64 %6 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %5 - %7 = load i32, ptr addrspace(1) %6, align 4, !tbaa !147, !alias.scope !316, !noalias !319 + %7 = load i32, ptr addrspace(1) %6, align 4, !tbaa !148, !alias.scope !323, !noalias !326 %8 = icmp eq i32 %7, 0 br i1 %8, label %9, label %14 @@ -573,7 +597,7 @@ define void @vote_loop(ptr addrspace(1) noundef readonly captures(none) "air-buf %11 = insertelement <2 x i32> undef, i32 %10, i64 0 %12 = insertelement <2 x i32> %11, i32 %3, i64 1 %13 = getelementptr inbounds <2 x i32>, ptr addrspace(1) %1, i64 %5 - store <2 x i32> %12, ptr addrspace(1) %13, align 8, !tbaa !129, !alias.scope !319, !noalias !316 + store <2 x i32> %12, ptr addrspace(1) %13, align 8, !tbaa !130, !alias.scope !326, !noalias !323 ret void 14: ; preds = %14, %4 @@ -584,17 +608,17 @@ define void @vote_loop(ptr addrspace(1) noundef readonly captures(none) "air-buf tail call void @air.simdgroup.barrier(i32 0, i32 4) #20 %19 = add nuw i32 %15, 1 %20 = icmp eq i32 %19, %7 - br i1 %20, label %9, label %14, !llvm.loop !321 + br i1 %20, label %9, label %14, !llvm.loop !328 } ; Function Attrs: convergent mustprogress nounwind define void @group_sums(ptr addrspace(1) noundef readonly captures(none) "air-buffer-no-alias" %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, ptr addrspace(3) noundef captures(none) "air-buffer-no-alias" %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #11 { %8 = zext i32 %6 to i64 %9 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %8 - %10 = load i32, ptr addrspace(1) %9, align 4, !tbaa !147, !alias.scope !322, !noalias !325 + %10 = load i32, ptr addrspace(1) %9, align 4, !tbaa !148, !alias.scope !329, !noalias !332 %11 = zext i32 %3 to i64 %12 = getelementptr inbounds i32, ptr addrspace(3) %2, i64 %11 - store i32 %10, ptr addrspace(3) %12, align 4, !tbaa !147, !alias.scope !328, !noalias !329 + store i32 %10, ptr addrspace(3) %12, align 4, !tbaa !148, !alias.scope !335, !noalias !336 tail call void @air.wg.barrier(i32 2, i32 1) #20 %13 = icmp ult i32 %4, 2 br i1 %13, label %14, label %16 @@ -613,22 +637,22 @@ define void @group_sums(ptr addrspace(1) noundef readonly captures(none) "air-bu %21 = add i32 %18, %3 %22 = zext i32 %21 to i64 %23 = getelementptr inbounds i32, ptr addrspace(3) %2, i64 %22 - %24 = load i32, ptr addrspace(3) %23, align 4, !tbaa !147, !alias.scope !328, !noalias !329 - %25 = load i32, ptr addrspace(3) %12, align 4, !tbaa !147, !alias.scope !328, !noalias !329 + %24 = load i32, ptr addrspace(3) %23, align 4, !tbaa !148, !alias.scope !335, !noalias !336 + %25 = load i32, ptr addrspace(3) %12, align 4, !tbaa !148, !alias.scope !335, !noalias !336 %26 = add i32 %25, %24 - store i32 %26, ptr addrspace(3) %12, align 4, !tbaa !147, !alias.scope !328, !noalias !329 + store i32 %26, ptr addrspace(3) %12, align 4, !tbaa !148, !alias.scope !335, !noalias !336 br label %27 27: ; preds = %20, %16 tail call void @air.wg.barrier(i32 2, i32 1) #20 %28 = icmp ult i32 %17, 4 - br i1 %28, label %14, label %16, !llvm.loop !330 + br i1 %28, label %14, label %16, !llvm.loop !337 29: ; preds = %14 %30 = zext i32 %5 to i64 %31 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %30 - %32 = load i32, ptr addrspace(3) %2, align 4, !tbaa !147, !alias.scope !328, !noalias !329 - store i32 %32, ptr addrspace(1) %31, align 4, !tbaa !147, !alias.scope !331, !noalias !332 + %32 = load i32, ptr addrspace(3) %2, align 4, !tbaa !148, !alias.scope !335, !noalias !336 + store i32 %32, ptr addrspace(1) %31, align 4, !tbaa !148, !alias.scope !338, !noalias !339 br label %33 33: ; preds = %29, %14 @@ -642,7 +666,7 @@ define void @constant_reads(ptr addrspace(2) noundef readonly captures(none) "ai 4: ; preds = %7 %5 = zext i32 %2 to i64 %6 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %5 - store i32 %23, ptr addrspace(1) %6, align 4, !tbaa !147, !alias.scope !333, !noalias !336 + store i32 %23, ptr addrspace(1) %6, align 4, !tbaa !148, !alias.scope !340, !noalias !343 ret void 7: ; preds = %7, %3 @@ -653,7 +677,7 @@ define void @constant_reads(ptr addrspace(2) noundef readonly captures(none) "ai %12 = and i32 %11, 4095 %13 = zext i32 %12 to i64 %14 = getelementptr inbounds <4 x i32>, ptr addrspace(2) %0, i64 %13 - %15 = load <4 x i32>, ptr addrspace(2) %14, align 16, !tbaa !129, !alias.scope !336, !noalias !333 + %15 = load <4 x i32>, ptr addrspace(2) %14, align 16, !tbaa !130, !alias.scope !343, !noalias !340 %16 = extractelement <4 x i32> %15, i64 0 %17 = xor i32 %16, %8 %18 = extractelement <4 x i32> %15, i64 1 @@ -664,7 +688,7 @@ define void @constant_reads(ptr addrspace(2) noundef readonly captures(none) "ai %23 = add i32 %19, %22 %24 = add nuw nsw i32 %9, 1 %25 = icmp eq i32 %24, 64 - br i1 %25, label %4, label %7, !llvm.loop !338 + br i1 %25, label %4, label %7, !llvm.loop !345 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) @@ -708,10 +732,10 @@ declare { <4 x float>, i8 } @air.sample_texture_2d.v4f32(ptr addrspace(1) readon ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write) define internal void @_GLOBAL__sub_I__() #18 section "air.static_init" { - %1 = load float, ptr addrspace(2) @_Z13positive_zero.MTL_FC_INIT_0_f, align 4, !tbaa !154 - store float %1, ptr addrspace(2) @_ZL13positive_zero, align 4, !tbaa !154 - %2 = load float, ptr addrspace(2) @_Z13negative_zero.MTL_FC_INIT_1_f, align 4, !tbaa !154 - store float %2, ptr addrspace(2) @_ZL13negative_zero, align 4, !tbaa !154 + %1 = load float, ptr addrspace(2) @_Z13positive_zero.MTL_FC_INIT_0_f, align 4, !tbaa !155 + store float %1, ptr addrspace(2) @_ZL13positive_zero, align 4, !tbaa !155 + %2 = load float, ptr addrspace(2) @_Z13negative_zero.MTL_FC_INIT_1_f, align 4, !tbaa !155 + store float %2, ptr addrspace(2) @_ZL13negative_zero, align 4, !tbaa !155 ret void } @@ -742,13 +766,13 @@ attributes #23 = { nounwind willreturn memory(argmem: read) } attributes #24 = { convergent nounwind willreturn memory(argmem: read) } !llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} -!air.kernel = !{!9, !15, !21, !25, !30, !40, !44, !48, !51, !55, !60, !65, !68, !71, !98, !101, !104, !109, !117} -!air.compile_options = !{!120, !121, !122} -!air.function_constants = !{!123, !124} -!air.sampler_states = !{!125} -!llvm.ident = !{!126} -!air.version = !{!127} -!air.language_version = !{!128} +!air.kernel = !{!9, !15, !21, !25, !30, !40, !44, !48, !51, !55, !60, !65, !68, !71, !72, !99, !102, !105, !110, !118} +!air.compile_options = !{!121, !122, !123} +!air.function_constants = !{!124, !125} +!air.sampler_states = !{!126} +!llvm.ident = !{!127} +!air.version = !{!128} +!air.language_version = !{!129} !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 2]} !1 = !{i32 1, !"wchar_size", i32 4} @@ -821,271 +845,278 @@ attributes #24 = { convergent nounwind willreturn memory(argmem: read) } !68 = !{ptr @sample_down_layers, !10, !69} !69 = !{!62, !63, !64, !70} !70 = !{i32 3, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint3", !"air.arg_name", !"position"} -!71 = !{ptr @wide_bindings, !10, !72} -!72 = !{!73, !74, !75, !76, !77, !78, !79, !80, !81, !82, !83, !84, !85, !86, !87, !88, !89, !90, !91, !92, !93, !94, !95, !96, !97} -!73 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b0"} -!74 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b1"} -!75 = !{i32 2, !"air.buffer", !"air.location_index", i32 2, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b2"} -!76 = !{i32 3, !"air.buffer", !"air.location_index", i32 3, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b3"} -!77 = !{i32 4, !"air.buffer", !"air.location_index", i32 4, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b4"} -!78 = !{i32 5, !"air.buffer", !"air.location_index", i32 5, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b5"} -!79 = !{i32 6, !"air.buffer", !"air.location_index", i32 6, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b6"} -!80 = !{i32 7, !"air.buffer", !"air.location_index", i32 7, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b7"} -!81 = !{i32 8, !"air.buffer", !"air.location_index", i32 8, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b8"} -!82 = !{i32 9, !"air.buffer", !"air.location_index", i32 9, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b9"} -!83 = !{i32 10, !"air.buffer", !"air.location_index", i32 10, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b10"} -!84 = !{i32 11, !"air.buffer", !"air.location_index", i32 11, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b11"} -!85 = !{i32 12, !"air.buffer", !"air.location_index", i32 12, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b12"} -!86 = !{i32 13, !"air.buffer", !"air.location_index", i32 13, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b13"} -!87 = !{i32 14, !"air.buffer", !"air.location_index", i32 14, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b14"} -!88 = !{i32 15, !"air.buffer", !"air.location_index", i32 15, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b15"} -!89 = !{i32 16, !"air.buffer", !"air.location_index", i32 16, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b16"} -!90 = !{i32 17, !"air.buffer", !"air.location_index", i32 17, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b17"} -!91 = !{i32 18, !"air.buffer", !"air.location_index", i32 18, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b18"} -!92 = !{i32 19, !"air.buffer", !"air.location_index", i32 19, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b19"} -!93 = !{i32 20, !"air.buffer", !"air.location_index", i32 20, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b20"} -!94 = !{i32 21, !"air.buffer", !"air.location_index", i32 21, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b21"} -!95 = !{i32 22, !"air.buffer", !"air.location_index", i32 22, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b22"} -!96 = !{i32 23, !"air.buffer", !"air.location_index", i32 23, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"destination"} -!97 = !{i32 24, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} -!98 = !{ptr @wave_store, !10, !99} -!99 = !{!50, !100, !67} -!100 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"base"} -!101 = !{ptr @signed_zero_products, !10, !102} -!102 = !{!103, !24, !14} -!103 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"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", !"destination"} -!104 = !{ptr @vote_loop, !10, !105} -!105 = !{!106, !107, !14, !108} -!106 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"steps"} -!107 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"uint2", !"air.arg_name", !"destination"} -!108 = !{i32 3, !"air.thread_index_in_simdgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"lane"} -!109 = !{ptr @group_sums, !10, !110} -!110 = !{!27, !111, !112, !113, !114, !115, !116} -!111 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"sums"} -!112 = !{i32 2, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 3, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"scratch"} -!113 = !{i32 3, !"air.thread_position_in_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"at"} -!114 = !{i32 4, !"air.threads_per_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"size"} -!115 = !{i32 5, !"air.threadgroup_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"group"} -!116 = !{i32 6, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} -!117 = !{ptr @constant_reads, !10, !118} -!118 = !{!119, !28, !14} -!119 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 16, !"air.arg_type_align_size", i32 16, !"air.arg_type_name", !"uint4", !"air.arg_name", !"table"} -!120 = !{!"air.compile.denorms_disable"} -!121 = !{!"air.compile.fast_math_enable"} -!122 = !{!"air.compile.framebuffer_fetch_enable"} -!123 = !{ptr addrspace(2) @_Z13positive_zero.MTL_FC_INIT_0_f, !"float", !"positive_zero", i32 0} -!124 = !{ptr addrspace(2) @_Z13negative_zero.MTL_FC_INIT_1_f, !"float", !"negative_zero", i32 1} -!125 = !{!"air.sampler_state", ptr addrspace(2) @__air_sampler_state} -!126 = !{!"Apple metal version 32023.922 (metalfe-32023.922.4)"} -!127 = !{i32 2, i32 8, i32 0} -!128 = !{!"Metal", i32 4, i32 0, i32 0} -!129 = !{!130, !130, i64 0} -!130 = !{!"omnipotent char", !131, i64 0} -!131 = !{!"Simple C++ TBAA"} -!132 = !{!133} -!133 = distinct !{!133, !134, !"air-alias-scope-arg(0)"} -!134 = distinct !{!134, !"air-alias-scopes(copy_words)"} -!135 = !{!136} -!136 = distinct !{!136, !134, !"air-alias-scope-arg(1)"} -!137 = !{!138} -!138 = distinct !{!138, !139, !"air-alias-scope-arg(0)"} -!139 = distinct !{!139, !"air-alias-scopes(scale_offset)"} -!140 = !{!141, !142} -!141 = distinct !{!141, !139, !"air-alias-scope-arg(1)"} -!142 = distinct !{!142, !139, !"air-alias-scope-arg(2)"} -!143 = !{!142} -!144 = !{!138, !141} -!145 = !{!141} -!146 = !{!138, !142} -!147 = !{!148, !148, i64 0} -!148 = !{!"int", !130, i64 0} -!149 = !{!150} -!150 = distinct !{!150, !151, !"air-alias-scope-arg(1)"} -!151 = distinct !{!151, !"air-alias-scopes(fma_chains)"} -!152 = !{!153} -!153 = distinct !{!153, !151, !"air-alias-scope-arg(0)"} -!154 = !{!155, !155, i64 0} -!155 = !{!"float", !130, i64 0} -!156 = distinct !{!156, !157} -!157 = !{!"llvm.loop.mustprogress"} -!158 = !{!159} -!159 = distinct !{!159, !160, !"air-alias-scope-arg(0)"} -!160 = distinct !{!160, !"air-alias-scopes(block_scan)"} -!161 = !{!162} -!162 = distinct !{!162, !160, !"air-alias-scope-arg(1)"} -!163 = distinct !{!163, !157} -!164 = !{!165} -!165 = distinct !{!165, !166, !"air-alias-scope-arg(2)"} -!166 = distinct !{!166, !"air-alias-scopes(reduce_sum)"} -!167 = !{!168, !169} -!168 = distinct !{!168, !166, !"air-alias-scope-arg(0)"} -!169 = distinct !{!169, !166, !"air-alias-scope-arg(1)"} -!170 = !{!168} -!171 = !{!169, !165} -!172 = distinct !{!172, !157} -!173 = distinct !{!173, !157} -!174 = !{!169} -!175 = !{!168, !165} -!176 = !{!177} -!177 = distinct !{!177, !178, !"air-alias-scope-arg(2)"} -!178 = distinct !{!178, !"air-alias-scopes(binomial3x3)"} -!179 = !{!180, !181} -!180 = distinct !{!180, !178, !"air-alias-scope-arg(0)"} -!181 = distinct !{!181, !178, !"air-alias-scope-arg(1)"} -!182 = !{!181} -!183 = !{!180, !177} -!184 = distinct !{!184, !157} -!185 = !{!180} -!186 = !{!181, !177} -!187 = distinct !{!187, !157} -!188 = !{!189} -!189 = distinct !{!189, !190, !"air-alias-scope-arg(0)"} -!190 = distinct !{!190, !"air-alias-scopes(lcg_step)"} -!191 = !{!192} -!192 = distinct !{!192, !190, !"air-alias-scope-arg(1)"} -!193 = !{!194} -!194 = distinct !{!194, !195, !"air-alias-scope-arg(1)"} -!195 = distinct !{!195, !"air-alias-scopes(narrow_mix)"} -!196 = !{!197} -!197 = distinct !{!197, !195, !"air-alias-scope-arg(0)"} -!198 = distinct !{!198, !157} -!199 = !{!200} -!200 = distinct !{!200, !201, !"air-alias-scope-arg(1)"} -!201 = distinct !{!201, !"air-alias-scopes(texels_in)"} -!202 = !{!203, !204} -!203 = distinct !{!203, !201, !"air-alias-scope-arg(0)"} -!204 = distinct !{!204, !201, !"air-alias-scope-textures"} -!205 = !{!203} -!206 = !{!200, !204} -!207 = !{!204} -!208 = !{!203, !200} -!209 = !{!210} -!210 = distinct !{!210, !211, !"air-alias-scope-arg(2)"} -!211 = distinct !{!211, !"air-alias-scopes(texels_out)"} -!212 = !{!213, !214} -!213 = distinct !{!213, !211, !"air-alias-scope-textures"} -!214 = distinct !{!214, !211, !"air-alias-scope-arg(1)"} -!215 = !{!214} -!216 = !{!213, !210} -!217 = !{!218} -!218 = distinct !{!218, !219, !"air-alias-scope-textures"} -!219 = distinct !{!219, !"air-alias-scopes(sample_down)"} -!220 = !{!221} -!221 = distinct !{!221, !219, !"air-alias-scope-samplers"} -!222 = !{!218, !221} -!223 = !{!224} -!224 = distinct !{!224, !225, !"air-alias-scope-textures"} -!225 = distinct !{!225, !"air-alias-scopes(sample_up)"} -!226 = !{!227} -!227 = distinct !{!227, !228, !"air-alias-scope-textures"} -!228 = distinct !{!228, !"air-alias-scopes(sample_down_layers)"} -!229 = !{!230} -!230 = distinct !{!230, !228, !"air-alias-scope-samplers"} -!231 = !{!227, !230} -!232 = !{!233} -!233 = distinct !{!233, !234, !"air-alias-scope-arg(0)"} -!234 = distinct !{!234, !"air-alias-scopes(wide_bindings)"} -!235 = !{!236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!236 = distinct !{!236, !234, !"air-alias-scope-arg(1)"} -!237 = distinct !{!237, !234, !"air-alias-scope-arg(2)"} -!238 = distinct !{!238, !234, !"air-alias-scope-arg(3)"} -!239 = distinct !{!239, !234, !"air-alias-scope-arg(4)"} -!240 = distinct !{!240, !234, !"air-alias-scope-arg(5)"} -!241 = distinct !{!241, !234, !"air-alias-scope-arg(6)"} -!242 = distinct !{!242, !234, !"air-alias-scope-arg(7)"} -!243 = distinct !{!243, !234, !"air-alias-scope-arg(8)"} -!244 = distinct !{!244, !234, !"air-alias-scope-arg(9)"} -!245 = distinct !{!245, !234, !"air-alias-scope-arg(10)"} -!246 = distinct !{!246, !234, !"air-alias-scope-arg(11)"} -!247 = distinct !{!247, !234, !"air-alias-scope-arg(12)"} -!248 = distinct !{!248, !234, !"air-alias-scope-arg(13)"} -!249 = distinct !{!249, !234, !"air-alias-scope-arg(14)"} -!250 = distinct !{!250, !234, !"air-alias-scope-arg(15)"} -!251 = distinct !{!251, !234, !"air-alias-scope-arg(16)"} -!252 = distinct !{!252, !234, !"air-alias-scope-arg(17)"} -!253 = distinct !{!253, !234, !"air-alias-scope-arg(18)"} -!254 = distinct !{!254, !234, !"air-alias-scope-arg(19)"} -!255 = distinct !{!255, !234, !"air-alias-scope-arg(20)"} -!256 = distinct !{!256, !234, !"air-alias-scope-arg(21)"} -!257 = distinct !{!257, !234, !"air-alias-scope-arg(22)"} -!258 = distinct !{!258, !234, !"air-alias-scope-arg(23)"} -!259 = !{!236} -!260 = !{!233, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!261 = !{!237} -!262 = !{!233, !236, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!263 = !{!238} -!264 = !{!233, !236, !237, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!265 = !{!239} -!266 = !{!233, !236, !237, !238, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!267 = !{!240} -!268 = !{!233, !236, !237, !238, !239, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!269 = !{!241} -!270 = !{!233, !236, !237, !238, !239, !240, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!271 = !{!242} -!272 = !{!233, !236, !237, !238, !239, !240, !241, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!273 = !{!243} -!274 = !{!233, !236, !237, !238, !239, !240, !241, !242, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!275 = !{!244} -!276 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!277 = !{!245} -!278 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!279 = !{!246} -!280 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!281 = !{!247} -!282 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!283 = !{!248} -!284 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!285 = !{!249} -!286 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !250, !251, !252, !253, !254, !255, !256, !257, !258} -!287 = !{!250} -!288 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !251, !252, !253, !254, !255, !256, !257, !258} -!289 = !{!251} -!290 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !252, !253, !254, !255, !256, !257, !258} -!291 = !{!252} -!292 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !253, !254, !255, !256, !257, !258} -!293 = !{!253} -!294 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !254, !255, !256, !257, !258} -!295 = !{!254} -!296 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !255, !256, !257, !258} -!297 = !{!255} -!298 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !256, !257, !258} -!299 = !{!256} -!300 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !257, !258} -!301 = !{!257} -!302 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !258} -!303 = !{!258} -!304 = !{!233, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257} -!305 = !{!306} -!306 = distinct !{!306, !307, !"air-alias-scope-arg(1)"} -!307 = distinct !{!307, !"air-alias-scopes(wave_store)"} -!308 = !{!309} -!309 = distinct !{!309, !307, !"air-alias-scope-arg(0)"} -!310 = !{!311} -!311 = distinct !{!311, !312, !"air-alias-scope-arg(1)"} -!312 = distinct !{!312, !"air-alias-scopes(signed_zero_products)"} -!313 = !{!314} -!314 = distinct !{!314, !312, !"air-alias-scope-arg(0)"} -!315 = distinct !{!315, !157} -!316 = !{!317} -!317 = distinct !{!317, !318, !"air-alias-scope-arg(0)"} -!318 = distinct !{!318, !"air-alias-scopes(vote_loop)"} -!319 = !{!320} -!320 = distinct !{!320, !318, !"air-alias-scope-arg(1)"} -!321 = distinct !{!321, !157} -!322 = !{!323} -!323 = distinct !{!323, !324, !"air-alias-scope-arg(0)"} -!324 = distinct !{!324, !"air-alias-scopes(group_sums)"} -!325 = !{!326, !327} -!326 = distinct !{!326, !324, !"air-alias-scope-arg(1)"} -!327 = distinct !{!327, !324, !"air-alias-scope-arg(2)"} -!328 = !{!327} -!329 = !{!323, !326} -!330 = distinct !{!330, !157} -!331 = !{!326} -!332 = !{!323, !327} -!333 = !{!334} -!334 = distinct !{!334, !335, !"air-alias-scope-arg(1)"} -!335 = distinct !{!335, !"air-alias-scopes(constant_reads)"} -!336 = !{!337} -!337 = distinct !{!337, !335, !"air-alias-scope-arg(0)"} -!338 = distinct !{!338, !157} +!71 = !{ptr @sample_down_distinct, !10, !69} +!72 = !{ptr @wide_bindings, !10, !73} +!73 = !{!74, !75, !76, !77, !78, !79, !80, !81, !82, !83, !84, !85, !86, !87, !88, !89, !90, !91, !92, !93, !94, !95, !96, !97, !98} +!74 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b0"} +!75 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b1"} +!76 = !{i32 2, !"air.buffer", !"air.location_index", i32 2, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b2"} +!77 = !{i32 3, !"air.buffer", !"air.location_index", i32 3, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b3"} +!78 = !{i32 4, !"air.buffer", !"air.location_index", i32 4, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b4"} +!79 = !{i32 5, !"air.buffer", !"air.location_index", i32 5, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b5"} +!80 = !{i32 6, !"air.buffer", !"air.location_index", i32 6, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b6"} +!81 = !{i32 7, !"air.buffer", !"air.location_index", i32 7, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b7"} +!82 = !{i32 8, !"air.buffer", !"air.location_index", i32 8, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b8"} +!83 = !{i32 9, !"air.buffer", !"air.location_index", i32 9, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b9"} +!84 = !{i32 10, !"air.buffer", !"air.location_index", i32 10, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b10"} +!85 = !{i32 11, !"air.buffer", !"air.location_index", i32 11, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b11"} +!86 = !{i32 12, !"air.buffer", !"air.location_index", i32 12, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b12"} +!87 = !{i32 13, !"air.buffer", !"air.location_index", i32 13, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b13"} +!88 = !{i32 14, !"air.buffer", !"air.location_index", i32 14, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b14"} +!89 = !{i32 15, !"air.buffer", !"air.location_index", i32 15, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b15"} +!90 = !{i32 16, !"air.buffer", !"air.location_index", i32 16, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b16"} +!91 = !{i32 17, !"air.buffer", !"air.location_index", i32 17, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b17"} +!92 = !{i32 18, !"air.buffer", !"air.location_index", i32 18, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b18"} +!93 = !{i32 19, !"air.buffer", !"air.location_index", i32 19, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b19"} +!94 = !{i32 20, !"air.buffer", !"air.location_index", i32 20, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b20"} +!95 = !{i32 21, !"air.buffer", !"air.location_index", i32 21, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b21"} +!96 = !{i32 22, !"air.buffer", !"air.location_index", i32 22, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"b22"} +!97 = !{i32 23, !"air.buffer", !"air.location_index", i32 23, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"destination"} +!98 = !{i32 24, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} +!99 = !{ptr @wave_store, !10, !100} +!100 = !{!50, !101, !67} +!101 = !{i32 1, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"base"} +!102 = !{ptr @signed_zero_products, !10, !103} +!103 = !{!104, !24, !14} +!104 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"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", !"destination"} +!105 = !{ptr @vote_loop, !10, !106} +!106 = !{!107, !108, !14, !109} +!107 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"steps"} +!108 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 8, !"air.arg_type_align_size", i32 8, !"air.arg_type_name", !"uint2", !"air.arg_name", !"destination"} +!109 = !{i32 3, !"air.thread_index_in_simdgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"lane"} +!110 = !{ptr @group_sums, !10, !111} +!111 = !{!27, !112, !113, !114, !115, !116, !117} +!112 = !{i32 1, !"air.buffer", !"air.location_index", i32 1, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"sums"} +!113 = !{i32 2, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 3, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"scratch"} +!114 = !{i32 3, !"air.thread_position_in_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"at"} +!115 = !{i32 4, !"air.threads_per_threadgroup", !"air.arg_type_name", !"uint", !"air.arg_name", !"size"} +!116 = !{i32 5, !"air.threadgroup_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"group"} +!117 = !{i32 6, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"index"} +!118 = !{ptr @constant_reads, !10, !119} +!119 = !{!120, !28, !14} +!120 = !{i32 0, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 16, !"air.arg_type_align_size", i32 16, !"air.arg_type_name", !"uint4", !"air.arg_name", !"table"} +!121 = !{!"air.compile.denorms_disable"} +!122 = !{!"air.compile.fast_math_enable"} +!123 = !{!"air.compile.framebuffer_fetch_enable"} +!124 = !{ptr addrspace(2) @_Z13positive_zero.MTL_FC_INIT_0_f, !"float", !"positive_zero", i32 0} +!125 = !{ptr addrspace(2) @_Z13negative_zero.MTL_FC_INIT_1_f, !"float", !"negative_zero", i32 1} +!126 = !{!"air.sampler_state", ptr addrspace(2) @__air_sampler_state} +!127 = !{!"Apple metal version 32023.922 (metalfe-32023.922.4)"} +!128 = !{i32 2, i32 8, i32 0} +!129 = !{!"Metal", i32 4, i32 0, i32 0} +!130 = !{!131, !131, i64 0} +!131 = !{!"omnipotent char", !132, i64 0} +!132 = !{!"Simple C++ TBAA"} +!133 = !{!134} +!134 = distinct !{!134, !135, !"air-alias-scope-arg(0)"} +!135 = distinct !{!135, !"air-alias-scopes(copy_words)"} +!136 = !{!137} +!137 = distinct !{!137, !135, !"air-alias-scope-arg(1)"} +!138 = !{!139} +!139 = distinct !{!139, !140, !"air-alias-scope-arg(0)"} +!140 = distinct !{!140, !"air-alias-scopes(scale_offset)"} +!141 = !{!142, !143} +!142 = distinct !{!142, !140, !"air-alias-scope-arg(1)"} +!143 = distinct !{!143, !140, !"air-alias-scope-arg(2)"} +!144 = !{!143} +!145 = !{!139, !142} +!146 = !{!142} +!147 = !{!139, !143} +!148 = !{!149, !149, i64 0} +!149 = !{!"int", !131, i64 0} +!150 = !{!151} +!151 = distinct !{!151, !152, !"air-alias-scope-arg(1)"} +!152 = distinct !{!152, !"air-alias-scopes(fma_chains)"} +!153 = !{!154} +!154 = distinct !{!154, !152, !"air-alias-scope-arg(0)"} +!155 = !{!156, !156, i64 0} +!156 = !{!"float", !131, i64 0} +!157 = distinct !{!157, !158} +!158 = !{!"llvm.loop.mustprogress"} +!159 = !{!160} +!160 = distinct !{!160, !161, !"air-alias-scope-arg(0)"} +!161 = distinct !{!161, !"air-alias-scopes(block_scan)"} +!162 = !{!163} +!163 = distinct !{!163, !161, !"air-alias-scope-arg(1)"} +!164 = distinct !{!164, !158} +!165 = !{!166} +!166 = distinct !{!166, !167, !"air-alias-scope-arg(2)"} +!167 = distinct !{!167, !"air-alias-scopes(reduce_sum)"} +!168 = !{!169, !170} +!169 = distinct !{!169, !167, !"air-alias-scope-arg(0)"} +!170 = distinct !{!170, !167, !"air-alias-scope-arg(1)"} +!171 = !{!169} +!172 = !{!170, !166} +!173 = distinct !{!173, !158} +!174 = distinct !{!174, !158} +!175 = !{!170} +!176 = !{!169, !166} +!177 = !{!178} +!178 = distinct !{!178, !179, !"air-alias-scope-arg(2)"} +!179 = distinct !{!179, !"air-alias-scopes(binomial3x3)"} +!180 = !{!181, !182} +!181 = distinct !{!181, !179, !"air-alias-scope-arg(0)"} +!182 = distinct !{!182, !179, !"air-alias-scope-arg(1)"} +!183 = !{!182} +!184 = !{!181, !178} +!185 = distinct !{!185, !158} +!186 = !{!181} +!187 = !{!182, !178} +!188 = distinct !{!188, !158} +!189 = !{!190} +!190 = distinct !{!190, !191, !"air-alias-scope-arg(0)"} +!191 = distinct !{!191, !"air-alias-scopes(lcg_step)"} +!192 = !{!193} +!193 = distinct !{!193, !191, !"air-alias-scope-arg(1)"} +!194 = !{!195} +!195 = distinct !{!195, !196, !"air-alias-scope-arg(1)"} +!196 = distinct !{!196, !"air-alias-scopes(narrow_mix)"} +!197 = !{!198} +!198 = distinct !{!198, !196, !"air-alias-scope-arg(0)"} +!199 = distinct !{!199, !158} +!200 = !{!201} +!201 = distinct !{!201, !202, !"air-alias-scope-arg(1)"} +!202 = distinct !{!202, !"air-alias-scopes(texels_in)"} +!203 = !{!204, !205} +!204 = distinct !{!204, !202, !"air-alias-scope-arg(0)"} +!205 = distinct !{!205, !202, !"air-alias-scope-textures"} +!206 = !{!204} +!207 = !{!201, !205} +!208 = !{!205} +!209 = !{!204, !201} +!210 = !{!211} +!211 = distinct !{!211, !212, !"air-alias-scope-arg(2)"} +!212 = distinct !{!212, !"air-alias-scopes(texels_out)"} +!213 = !{!214, !215} +!214 = distinct !{!214, !212, !"air-alias-scope-textures"} +!215 = distinct !{!215, !212, !"air-alias-scope-arg(1)"} +!216 = !{!215} +!217 = !{!214, !211} +!218 = !{!219} +!219 = distinct !{!219, !220, !"air-alias-scope-textures"} +!220 = distinct !{!220, !"air-alias-scopes(sample_down)"} +!221 = !{!222} +!222 = distinct !{!222, !220, !"air-alias-scope-samplers"} +!223 = !{!219, !222} +!224 = !{!225} +!225 = distinct !{!225, !226, !"air-alias-scope-textures"} +!226 = distinct !{!226, !"air-alias-scopes(sample_up)"} +!227 = !{!228} +!228 = distinct !{!228, !229, !"air-alias-scope-textures"} +!229 = distinct !{!229, !"air-alias-scopes(sample_down_layers)"} +!230 = !{!231} +!231 = distinct !{!231, !229, !"air-alias-scope-samplers"} +!232 = !{!228, !231} +!233 = !{!234} +!234 = distinct !{!234, !235, !"air-alias-scope-textures"} +!235 = distinct !{!235, !"air-alias-scopes(sample_down_distinct)"} +!236 = !{!237} +!237 = distinct !{!237, !235, !"air-alias-scope-samplers"} +!238 = !{!234, !237} +!239 = !{!240} +!240 = distinct !{!240, !241, !"air-alias-scope-arg(0)"} +!241 = distinct !{!241, !"air-alias-scopes(wide_bindings)"} +!242 = !{!243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!243 = distinct !{!243, !241, !"air-alias-scope-arg(1)"} +!244 = distinct !{!244, !241, !"air-alias-scope-arg(2)"} +!245 = distinct !{!245, !241, !"air-alias-scope-arg(3)"} +!246 = distinct !{!246, !241, !"air-alias-scope-arg(4)"} +!247 = distinct !{!247, !241, !"air-alias-scope-arg(5)"} +!248 = distinct !{!248, !241, !"air-alias-scope-arg(6)"} +!249 = distinct !{!249, !241, !"air-alias-scope-arg(7)"} +!250 = distinct !{!250, !241, !"air-alias-scope-arg(8)"} +!251 = distinct !{!251, !241, !"air-alias-scope-arg(9)"} +!252 = distinct !{!252, !241, !"air-alias-scope-arg(10)"} +!253 = distinct !{!253, !241, !"air-alias-scope-arg(11)"} +!254 = distinct !{!254, !241, !"air-alias-scope-arg(12)"} +!255 = distinct !{!255, !241, !"air-alias-scope-arg(13)"} +!256 = distinct !{!256, !241, !"air-alias-scope-arg(14)"} +!257 = distinct !{!257, !241, !"air-alias-scope-arg(15)"} +!258 = distinct !{!258, !241, !"air-alias-scope-arg(16)"} +!259 = distinct !{!259, !241, !"air-alias-scope-arg(17)"} +!260 = distinct !{!260, !241, !"air-alias-scope-arg(18)"} +!261 = distinct !{!261, !241, !"air-alias-scope-arg(19)"} +!262 = distinct !{!262, !241, !"air-alias-scope-arg(20)"} +!263 = distinct !{!263, !241, !"air-alias-scope-arg(21)"} +!264 = distinct !{!264, !241, !"air-alias-scope-arg(22)"} +!265 = distinct !{!265, !241, !"air-alias-scope-arg(23)"} +!266 = !{!243} +!267 = !{!240, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!268 = !{!244} +!269 = !{!240, !243, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!270 = !{!245} +!271 = !{!240, !243, !244, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!272 = !{!246} +!273 = !{!240, !243, !244, !245, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!274 = !{!247} +!275 = !{!240, !243, !244, !245, !246, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!276 = !{!248} +!277 = !{!240, !243, !244, !245, !246, !247, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!278 = !{!249} +!279 = !{!240, !243, !244, !245, !246, !247, !248, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!280 = !{!250} +!281 = !{!240, !243, !244, !245, !246, !247, !248, !249, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!282 = !{!251} +!283 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!284 = !{!252} +!285 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!286 = !{!253} +!287 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!288 = !{!254} +!289 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!290 = !{!255} +!291 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !256, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!292 = !{!256} +!293 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !257, !258, !259, !260, !261, !262, !263, !264, !265} +!294 = !{!257} +!295 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !258, !259, !260, !261, !262, !263, !264, !265} +!296 = !{!258} +!297 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !259, !260, !261, !262, !263, !264, !265} +!298 = !{!259} +!299 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !260, !261, !262, !263, !264, !265} +!300 = !{!260} +!301 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !261, !262, !263, !264, !265} +!302 = !{!261} +!303 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !262, !263, !264, !265} +!304 = !{!262} +!305 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !263, !264, !265} +!306 = !{!263} +!307 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !264, !265} +!308 = !{!264} +!309 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !265} +!310 = !{!265} +!311 = !{!240, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258, !259, !260, !261, !262, !263, !264} +!312 = !{!313} +!313 = distinct !{!313, !314, !"air-alias-scope-arg(1)"} +!314 = distinct !{!314, !"air-alias-scopes(wave_store)"} +!315 = !{!316} +!316 = distinct !{!316, !314, !"air-alias-scope-arg(0)"} +!317 = !{!318} +!318 = distinct !{!318, !319, !"air-alias-scope-arg(1)"} +!319 = distinct !{!319, !"air-alias-scopes(signed_zero_products)"} +!320 = !{!321} +!321 = distinct !{!321, !319, !"air-alias-scope-arg(0)"} +!322 = distinct !{!322, !158} +!323 = !{!324} +!324 = distinct !{!324, !325, !"air-alias-scope-arg(0)"} +!325 = distinct !{!325, !"air-alias-scopes(vote_loop)"} +!326 = !{!327} +!327 = distinct !{!327, !325, !"air-alias-scope-arg(1)"} +!328 = distinct !{!328, !158} +!329 = !{!330} +!330 = distinct !{!330, !331, !"air-alias-scope-arg(0)"} +!331 = distinct !{!331, !"air-alias-scopes(group_sums)"} +!332 = !{!333, !334} +!333 = distinct !{!333, !331, !"air-alias-scope-arg(1)"} +!334 = distinct !{!334, !331, !"air-alias-scope-arg(2)"} +!335 = !{!334} +!336 = !{!330, !333} +!337 = distinct !{!337, !158} +!338 = !{!333} +!339 = !{!330, !334} +!340 = !{!341} +!341 = distinct !{!341, !342, !"air-alias-scope-arg(1)"} +!342 = distinct !{!342, !"air-alias-scopes(constant_reads)"} +!343 = !{!344} +!344 = distinct !{!344, !342, !"air-alias-scope-arg(0)"} +!345 = distinct !{!345, !158} diff --git a/crates/metal2vulkan-validation/fixtures/public/harness/workloads.metal b/crates/metal2vulkan-validation/fixtures/public/harness/workloads.metal index 164ab7057..f4afe7e6d 100644 --- a/crates/metal2vulkan-validation/fixtures/public/harness/workloads.metal +++ b/crates/metal2vulkan-validation/fixtures/public/harness/workloads.metal @@ -195,6 +195,20 @@ kernel void sample_down_layers(texture2d source [[texture destination.write(texel, uint2(position.x, position.y + position.z * height)); } +// Sampling over a grid more than one deep, each layer from its own source: layer `z` is a 2x +// downsample of its own rows of the source into its own rows of the destination (both `z` times +// a layer's height on, the destination's layers as tall as it is wide), so no two layers read +// the same texels; one texture write a thread. +kernel void sample_down_distinct(texture2d source [[texture(0)]], + texture2d destination [[texture(1)]], + sampler filter [[sampler(0)]], + uint3 position [[thread_position_in_grid]]) { + uint side = destination.get_width(); + float2 size = float2(side, destination.get_height()); + uint2 at = uint2(position.x, position.y + position.z * side); + destination.write(source.sample(filter, (float2(at) + 0.5f) / size), at); +} + // Many buffers bound for one kernel: each thread folds one word of each of 23 inputs into the // 24th, so a dispatch reads 24 buffer addresses, and many small dispatches each bind all 24. kernel void wide_bindings(device const uint *b0 [[buffer(0)]],