diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN b/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN index eb19f0db6..292fc5438 100644 --- a/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN +++ b/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN @@ -202,6 +202,7 @@ fixture icb_stage_in_template: metal: Apple metal version 32023.921 (metalfe-320 fixture icb_vertex_encode_indexed: metal: Apple metal version 32023.922 (metalfe-32023.922.4); macosx-sdk: 27.2 (26B118) fixture icb_vertex_encode_textured: metal: Apple metal version 32023.922 (metalfe-32023.922.4); macosx-sdk: 27.2 (26B118) fixture ido_draw_order: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) +fixture int24_products: metal: Apple metal version 32023.922 (metalfe-32023.922.4); macosx-sdk: 27.2 (26B118) fixture ipo_primitive_order: metal: Apple metal version 32023.922 (metalfe-32023.922.4); macosx-sdk: 27.2 (26B118) fixture ipr_reads: metal: Apple metal version 32023.922 (metalfe-32023.922.4); macosx-sdk: 27.2 (26B118) fixture kernel_agx_shfl: metal: Apple metal version 32023.922 (metalfe-32023.922.4); macosx-sdk: 27.2 (26B118) diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/int24_products.air.ll b/crates/metal2vulkan-validation/fixtures/public/engine/int24_products.air.ll new file mode 100644 index 000000000..d62d21798 --- /dev/null +++ b/crates/metal2vulkan-validation/fixtures/public/engine/int24_products.air.ll @@ -0,0 +1,361 @@ +; Generated by scripts/regen-air-fixtures from int24_products.metal (typed pointers; xcrun metal-as reassembles it). Do not edit. +; ModuleID = '-' +source_filename = "-" +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32" +target triple = "air64_v28-apple-macosx26.0.0" + +; Function Attrs: argmemonly mustprogress nofree nosync nounwind willreturn +define void @int24_products(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 writeonly "air-buffer-no-alias" %3, i32 noundef %4) local_unnamed_addr #0 { + %6 = urem i32 %4, 12 + %7 = zext i32 %6 to i64 + %8 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %7 + %9 = load i32, i32 addrspace(1)* %8, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %10 = add i32 %4, 1 + %11 = urem i32 %10, 12 + %12 = zext i32 %11 to i64 + %13 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %12 + %14 = load i32, i32 addrspace(1)* %13, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %15 = add i32 %4, 2 + %16 = urem i32 %15, 12 + %17 = zext i32 %16 to i64 + %18 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %17 + %19 = load i32, i32 addrspace(1)* %18, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %20 = add i32 %4, 3 + %21 = urem i32 %20, 12 + %22 = zext i32 %21 to i64 + %23 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %22 + %24 = load i32, i32 addrspace(1)* %23, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %25 = add i32 %4, 5 + %26 = urem i32 %25, 12 + %27 = zext i32 %26 to i64 + %28 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %27 + %29 = load i32, i32 addrspace(1)* %28, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %30 = add i32 %4, 7 + %31 = urem i32 %30, 12 + %32 = zext i32 %31 to i64 + %33 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %32 + %34 = load i32, i32 addrspace(1)* %33, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %35 = add i32 %4, 9 + %36 = urem i32 %35, 12 + %37 = zext i32 %36 to i64 + %38 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %37 + %39 = load i32, i32 addrspace(1)* %38, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %40 = add i32 %4, 11 + %41 = urem i32 %40, 12 + %42 = zext i32 %41 to i64 + %43 = getelementptr inbounds i32, i32 addrspace(1)* %0, i64 %42 + %44 = load i32, i32 addrspace(1)* %43, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %45 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %7 + %46 = load i32, i32 addrspace(1)* %45, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %47 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %12 + %48 = load i32, i32 addrspace(1)* %47, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %49 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %17 + %50 = load i32, i32 addrspace(1)* %49, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %51 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %22 + %52 = load i32, i32 addrspace(1)* %51, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %53 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %27 + %54 = load i32, i32 addrspace(1)* %53, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %55 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %32 + %56 = load i32, i32 addrspace(1)* %55, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %57 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %37 + %58 = load i32, i32 addrspace(1)* %57, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %59 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %42 + %60 = load i32, i32 addrspace(1)* %59, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %61 = getelementptr inbounds i32, i32 addrspace(1)* %2, i64 %7 + %62 = load i32, i32 addrspace(1)* %61, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %63 = add i32 %4, 4 + %64 = urem i32 %63, 12 + %65 = zext i32 %64 to i64 + %66 = getelementptr inbounds i32, i32 addrspace(1)* %2, i64 %65 + %67 = load i32, i32 addrspace(1)* %66, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %68 = add i32 %4, 8 + %69 = urem i32 %68, 12 + %70 = zext i32 %69 to i64 + %71 = getelementptr inbounds i32, i32 addrspace(1)* %2, i64 %70 + %72 = load i32, i32 addrspace(1)* %71, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %73 = add i32 %4, 10 + %74 = urem i32 %73, 12 + %75 = zext i32 %74 to i64 + %76 = getelementptr inbounds i32, i32 addrspace(1)* %2, i64 %75 + %77 = load i32, i32 addrspace(1)* %76, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %78 = mul i32 %4, 40 + %79 = zext i32 %78 to i64 + %80 = getelementptr inbounds i32, i32 addrspace(1)* %3, i64 %79 + %81 = tail call i32 @air.mul24.u.i32(i32 %9, i32 %14) #2 + store i32 %81, i32 addrspace(1)* %80, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %82 = tail call i32 @air.mad24.u.i32(i32 %9, i32 %14, i32 %62) #2 + %83 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 1 + store i32 %82, i32 addrspace(1)* %83, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %84 = tail call i32 @air.mul24.s.i32(i32 %46, i32 %48) #2 + %85 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 2 + store i32 %84, i32 addrspace(1)* %85, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %86 = tail call i32 @air.mad24.s.i32(i32 %46, i32 %48, i32 %62) #2 + %87 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 3 + store i32 %86, i32 addrspace(1)* %87, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %88 = insertelement <2 x i32> undef, i32 %19, i64 0 + %89 = insertelement <2 x i32> %88, i32 %29, i64 1 + %90 = insertelement <2 x i32> undef, i32 %24, i64 0 + %91 = insertelement <2 x i32> %90, i32 %34, i64 1 + %92 = tail call <2 x i32> @air.mul24.u.v2i32(<2 x i32> %89, <2 x i32> %91) #2 + %93 = insertelement <2 x i32> undef, i32 %67, i64 0 + %94 = insertelement <2 x i32> %93, i32 %72, i64 1 + %95 = tail call <2 x i32> @air.mad24.u.v2i32(<2 x i32> %89, <2 x i32> %91, <2 x i32> %94) #2 + %96 = extractelement <2 x i32> %92, i64 0 + %97 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 4 + store i32 %96, i32 addrspace(1)* %97, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %98 = extractelement <2 x i32> %92, i64 1 + %99 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 5 + store i32 %98, i32 addrspace(1)* %99, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %100 = extractelement <2 x i32> %95, i64 0 + %101 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 6 + store i32 %100, i32 addrspace(1)* %101, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %102 = extractelement <2 x i32> %95, i64 1 + %103 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 7 + store i32 %102, i32 addrspace(1)* %103, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %104 = insertelement <3 x i32> undef, i32 %14, i64 0 + %105 = insertelement <3 x i32> %104, i32 %29, i64 1 + %106 = insertelement <3 x i32> %105, i32 %39, i64 2 + %107 = insertelement <3 x i32> undef, i32 %34, i64 0 + %108 = insertelement <3 x i32> %107, i32 %44, i64 1 + %109 = insertelement <3 x i32> %108, i32 %9, i64 2 + %110 = tail call <3 x i32> @air.mul24.u.v3i32(<3 x i32> %106, <3 x i32> %109) #2 + %111 = insertelement <3 x i32> undef, i32 %72, i64 0 + %112 = insertelement <3 x i32> %111, i32 %77, i64 1 + %113 = insertelement <3 x i32> %112, i32 %62, i64 2 + %114 = tail call <3 x i32> @air.mad24.u.v3i32(<3 x i32> %106, <3 x i32> %109, <3 x i32> %113) #2 + %115 = extractelement <3 x i32> %110, i64 0 + %116 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 8 + store i32 %115, i32 addrspace(1)* %116, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %117 = extractelement <3 x i32> %110, i64 1 + %118 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 9 + store i32 %117, i32 addrspace(1)* %118, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %119 = extractelement <3 x i32> %110, i64 2 + %120 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 10 + store i32 %119, i32 addrspace(1)* %120, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %121 = extractelement <3 x i32> %114, i64 0 + %122 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 11 + store i32 %121, i32 addrspace(1)* %122, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %123 = extractelement <3 x i32> %114, i64 1 + %124 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 12 + store i32 %123, i32 addrspace(1)* %124, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %125 = extractelement <3 x i32> %114, i64 2 + %126 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 13 + store i32 %125, i32 addrspace(1)* %126, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %127 = insertelement <4 x i32> undef, i32 %9, i64 0 + %128 = insertelement <4 x i32> %127, i32 %19, i64 1 + %129 = insertelement <4 x i32> %128, i32 %29, i64 2 + %130 = insertelement <4 x i32> %129, i32 %39, i64 3 + %131 = insertelement <4 x i32> undef, i32 %44, i64 0 + %132 = insertelement <4 x i32> %131, i32 %34, i64 1 + %133 = insertelement <4 x i32> %132, i32 %24, i64 2 + %134 = insertelement <4 x i32> %133, i32 %14, i64 3 + %135 = tail call <4 x i32> @air.mul24.u.v4i32(<4 x i32> %130, <4 x i32> %134) #2 + %136 = insertelement <4 x i32> undef, i32 %77, i64 0 + %137 = insertelement <4 x i32> %136, i32 %72, i64 1 + %138 = insertelement <4 x i32> %137, i32 %67, i64 2 + %139 = insertelement <4 x i32> %138, i32 %62, i64 3 + %140 = tail call <4 x i32> @air.mad24.u.v4i32(<4 x i32> %130, <4 x i32> %134, <4 x i32> %139) #2 + %141 = extractelement <4 x i32> %135, i64 0 + %142 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 14 + store i32 %141, i32 addrspace(1)* %142, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %143 = extractelement <4 x i32> %135, i64 1 + %144 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 15 + store i32 %143, i32 addrspace(1)* %144, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %145 = extractelement <4 x i32> %135, i64 2 + %146 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 16 + store i32 %145, i32 addrspace(1)* %146, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %147 = extractelement <4 x i32> %135, i64 3 + %148 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 17 + store i32 %147, i32 addrspace(1)* %148, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %149 = extractelement <4 x i32> %140, i64 0 + %150 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 18 + store i32 %149, i32 addrspace(1)* %150, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %151 = extractelement <4 x i32> %140, i64 1 + %152 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 19 + store i32 %151, i32 addrspace(1)* %152, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %153 = extractelement <4 x i32> %140, i64 2 + %154 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 20 + store i32 %153, i32 addrspace(1)* %154, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %155 = extractelement <4 x i32> %140, i64 3 + %156 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 21 + store i32 %155, i32 addrspace(1)* %156, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %157 = insertelement <2 x i32> undef, i32 %50, i64 0 + %158 = insertelement <2 x i32> %157, i32 %54, i64 1 + %159 = insertelement <2 x i32> undef, i32 %52, i64 0 + %160 = insertelement <2 x i32> %159, i32 %56, i64 1 + %161 = tail call <2 x i32> @air.mul24.s.v2i32(<2 x i32> %158, <2 x i32> %160) #2 + %162 = tail call <2 x i32> @air.mad24.s.v2i32(<2 x i32> %158, <2 x i32> %160, <2 x i32> %94) #2 + %163 = extractelement <2 x i32> %161, i64 0 + %164 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 22 + store i32 %163, i32 addrspace(1)* %164, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %165 = extractelement <2 x i32> %161, i64 1 + %166 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 23 + store i32 %165, i32 addrspace(1)* %166, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %167 = extractelement <2 x i32> %162, i64 0 + %168 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 24 + store i32 %167, i32 addrspace(1)* %168, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %169 = extractelement <2 x i32> %162, i64 1 + %170 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 25 + store i32 %169, i32 addrspace(1)* %170, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %171 = insertelement <3 x i32> undef, i32 %48, i64 0 + %172 = insertelement <3 x i32> %171, i32 %54, i64 1 + %173 = insertelement <3 x i32> %172, i32 %58, i64 2 + %174 = insertelement <3 x i32> undef, i32 %56, i64 0 + %175 = insertelement <3 x i32> %174, i32 %60, i64 1 + %176 = insertelement <3 x i32> %175, i32 %46, i64 2 + %177 = tail call <3 x i32> @air.mul24.s.v3i32(<3 x i32> %173, <3 x i32> %176) #2 + %178 = tail call <3 x i32> @air.mad24.s.v3i32(<3 x i32> %173, <3 x i32> %176, <3 x i32> %113) #2 + %179 = extractelement <3 x i32> %177, i64 0 + %180 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 26 + store i32 %179, i32 addrspace(1)* %180, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %181 = extractelement <3 x i32> %177, i64 1 + %182 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 27 + store i32 %181, i32 addrspace(1)* %182, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %183 = extractelement <3 x i32> %177, i64 2 + %184 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 28 + store i32 %183, i32 addrspace(1)* %184, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %185 = extractelement <3 x i32> %178, i64 0 + %186 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 29 + store i32 %185, i32 addrspace(1)* %186, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %187 = extractelement <3 x i32> %178, i64 1 + %188 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 30 + store i32 %187, i32 addrspace(1)* %188, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %189 = extractelement <3 x i32> %178, i64 2 + %190 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 31 + store i32 %189, i32 addrspace(1)* %190, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %191 = insertelement <4 x i32> undef, i32 %46, i64 0 + %192 = insertelement <4 x i32> %191, i32 %50, i64 1 + %193 = insertelement <4 x i32> %192, i32 %54, i64 2 + %194 = insertelement <4 x i32> %193, i32 %58, i64 3 + %195 = insertelement <4 x i32> undef, i32 %60, i64 0 + %196 = insertelement <4 x i32> %195, i32 %56, i64 1 + %197 = insertelement <4 x i32> %196, i32 %52, i64 2 + %198 = insertelement <4 x i32> %197, i32 %48, i64 3 + %199 = tail call <4 x i32> @air.mul24.s.v4i32(<4 x i32> %194, <4 x i32> %198) #2 + %200 = tail call <4 x i32> @air.mad24.s.v4i32(<4 x i32> %194, <4 x i32> %198, <4 x i32> %139) #2 + %201 = extractelement <4 x i32> %199, i64 0 + %202 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 32 + store i32 %201, i32 addrspace(1)* %202, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %203 = extractelement <4 x i32> %199, i64 1 + %204 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 33 + store i32 %203, i32 addrspace(1)* %204, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %205 = extractelement <4 x i32> %199, i64 2 + %206 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 34 + store i32 %205, i32 addrspace(1)* %206, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %207 = extractelement <4 x i32> %199, i64 3 + %208 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 35 + store i32 %207, i32 addrspace(1)* %208, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %209 = extractelement <4 x i32> %200, i64 0 + %210 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 36 + store i32 %209, i32 addrspace(1)* %210, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %211 = extractelement <4 x i32> %200, i64 1 + %212 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 37 + store i32 %211, i32 addrspace(1)* %212, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %213 = extractelement <4 x i32> %200, i64 2 + %214 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 38 + store i32 %213, i32 addrspace(1)* %214, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %215 = extractelement <4 x i32> %200, i64 3 + %216 = getelementptr inbounds i32, i32 addrspace(1)* %80, i64 39 + store i32 %215, i32 addrspace(1)* %216, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + ret void +} + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare i32 @air.mul24.u.i32(i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare i32 @air.mad24.u.i32(i32, i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare i32 @air.mul24.s.i32(i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare i32 @air.mad24.s.i32(i32, i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <2 x i32> @air.mul24.u.v2i32(<2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <2 x i32> @air.mad24.u.v2i32(<2 x i32>, <2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <3 x i32> @air.mul24.u.v3i32(<3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <3 x i32> @air.mad24.u.v3i32(<3 x i32>, <3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <4 x i32> @air.mul24.u.v4i32(<4 x i32>, <4 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <4 x i32> @air.mad24.u.v4i32(<4 x i32>, <4 x i32>, <4 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <2 x i32> @air.mul24.s.v2i32(<2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <2 x i32> @air.mad24.s.v2i32(<2 x i32>, <2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <3 x i32> @air.mul24.s.v3i32(<3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <3 x i32> @air.mad24.s.v3i32(<3 x i32>, <3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <4 x i32> @air.mul24.s.v4i32(<4 x i32>, <4 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare <4 x i32> @air.mad24.s.v4i32(<4 x i32>, <4 x i32>, <4 x i32>) local_unnamed_addr #1 + +attributes #0 = { argmemonly mustprogress nofree nosync nounwind willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" } +attributes #1 = { mustprogress nofree nosync nounwind readnone willreturn } +attributes #2 = { nounwind readnone willreturn } + +!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} +!air.kernel = !{!9} +!air.compile_options = !{!17, !18, !19} +!llvm.ident = !{!20} +!air.version = !{!21} +!air.language_version = !{!22} + +!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 2]} +!1 = !{i32 1, !"wchar_size", i32 4} +!2 = !{i32 7, !"frame-pointer", i32 2} +!3 = !{i32 7, !"air.max_device_buffers", i32 31} +!4 = !{i32 7, !"air.max_constant_buffers", i32 31} +!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31} +!6 = !{i32 7, !"air.max_textures", i32 128} +!7 = !{i32 7, !"air.max_read_write_textures", i32 8} +!8 = !{i32 7, !"air.max_samplers", i32 16} +!9 = !{void (i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32 addrspace(1)*, i32)* @int24_products, !10, !11} +!10 = !{} +!11 = !{!12, !13, !14, !15, !16} +!12 = !{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", !"ux"} +!13 = !{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", !"int", !"air.arg_name", !"sx"} +!14 = !{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", !"zs"} +!15 = !{i32 3, !"air.buffer", !"air.location_index", i32 3, 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", !"out"} +!16 = !{i32 4, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"i"} +!17 = !{!"air.compile.denorms_disable"} +!18 = !{!"air.compile.fast_math_enable"} +!19 = !{!"air.compile.framebuffer_fetch_enable"} +!20 = !{!"Apple metal version 32023.922 (metalfe-32023.922.4)"} +!21 = !{i32 2, i32 8, i32 0} +!22 = !{!"Metal", i32 4, i32 0, i32 0} +!23 = !{!24, !24, i64 0} +!24 = !{!"int", !25, i64 0} +!25 = !{!"omnipotent char", !26, i64 0} +!26 = !{!"Simple C++ TBAA"} +!27 = !{!28} +!28 = distinct !{!28, !29, !"air-alias-scope-arg(0)"} +!29 = distinct !{!29, !"air-alias-scopes(int24_products)"} +!30 = !{!31, !32, !33} +!31 = distinct !{!31, !29, !"air-alias-scope-arg(1)"} +!32 = distinct !{!32, !29, !"air-alias-scope-arg(2)"} +!33 = distinct !{!33, !29, !"air-alias-scope-arg(3)"} +!34 = !{!31} +!35 = !{!28, !32, !33} +!36 = !{!32} +!37 = !{!28, !31, !33} +!38 = !{!33} +!39 = !{!28, !31, !32} diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/int24_products.ll b/crates/metal2vulkan-validation/fixtures/public/engine/int24_products.ll new file mode 100644 index 000000000..4aa65e090 --- /dev/null +++ b/crates/metal2vulkan-validation/fixtures/public/engine/int24_products.ll @@ -0,0 +1,361 @@ +; Generated by scripts/regen-air-fixtures from int24_products.metal (llvm-dis of int24_products.air). Do not edit. +; ModuleID = '' +source_filename = "-" +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32" +target triple = "air64_v28-apple-macosx26.0.0" + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) +define void @int24_products(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 writeonly captures(none) "air-buffer-no-alias" %3, i32 noundef %4) local_unnamed_addr #0 { + %6 = urem i32 %4, 12 + %7 = zext i32 %6 to i64 + %8 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %7 + %9 = load i32, ptr addrspace(1) %8, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %10 = add i32 %4, 1 + %11 = urem i32 %10, 12 + %12 = zext i32 %11 to i64 + %13 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %12 + %14 = load i32, ptr addrspace(1) %13, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %15 = add i32 %4, 2 + %16 = urem i32 %15, 12 + %17 = zext i32 %16 to i64 + %18 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %17 + %19 = load i32, ptr addrspace(1) %18, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %20 = add i32 %4, 3 + %21 = urem i32 %20, 12 + %22 = zext i32 %21 to i64 + %23 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %22 + %24 = load i32, ptr addrspace(1) %23, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %25 = add i32 %4, 5 + %26 = urem i32 %25, 12 + %27 = zext i32 %26 to i64 + %28 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %27 + %29 = load i32, ptr addrspace(1) %28, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %30 = add i32 %4, 7 + %31 = urem i32 %30, 12 + %32 = zext i32 %31 to i64 + %33 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %32 + %34 = load i32, ptr addrspace(1) %33, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %35 = add i32 %4, 9 + %36 = urem i32 %35, 12 + %37 = zext i32 %36 to i64 + %38 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %37 + %39 = load i32, ptr addrspace(1) %38, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %40 = add i32 %4, 11 + %41 = urem i32 %40, 12 + %42 = zext i32 %41 to i64 + %43 = getelementptr inbounds i32, ptr addrspace(1) %0, i64 %42 + %44 = load i32, ptr addrspace(1) %43, align 4, !tbaa !23, !alias.scope !27, !noalias !30 + %45 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %7 + %46 = load i32, ptr addrspace(1) %45, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %47 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %12 + %48 = load i32, ptr addrspace(1) %47, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %49 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %17 + %50 = load i32, ptr addrspace(1) %49, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %51 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %22 + %52 = load i32, ptr addrspace(1) %51, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %53 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %27 + %54 = load i32, ptr addrspace(1) %53, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %55 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %32 + %56 = load i32, ptr addrspace(1) %55, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %57 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %37 + %58 = load i32, ptr addrspace(1) %57, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %59 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %42 + %60 = load i32, ptr addrspace(1) %59, align 4, !tbaa !23, !alias.scope !34, !noalias !35 + %61 = getelementptr inbounds i32, ptr addrspace(1) %2, i64 %7 + %62 = load i32, ptr addrspace(1) %61, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %63 = add i32 %4, 4 + %64 = urem i32 %63, 12 + %65 = zext i32 %64 to i64 + %66 = getelementptr inbounds i32, ptr addrspace(1) %2, i64 %65 + %67 = load i32, ptr addrspace(1) %66, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %68 = add i32 %4, 8 + %69 = urem i32 %68, 12 + %70 = zext i32 %69 to i64 + %71 = getelementptr inbounds i32, ptr addrspace(1) %2, i64 %70 + %72 = load i32, ptr addrspace(1) %71, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %73 = add i32 %4, 10 + %74 = urem i32 %73, 12 + %75 = zext i32 %74 to i64 + %76 = getelementptr inbounds i32, ptr addrspace(1) %2, i64 %75 + %77 = load i32, ptr addrspace(1) %76, align 4, !tbaa !23, !alias.scope !36, !noalias !37 + %78 = mul i32 %4, 40 + %79 = zext i32 %78 to i64 + %80 = getelementptr inbounds i32, ptr addrspace(1) %3, i64 %79 + %81 = tail call i32 @air.mul24.u.i32(i32 %9, i32 %14) #2 + store i32 %81, ptr addrspace(1) %80, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %82 = tail call i32 @air.mad24.u.i32(i32 %9, i32 %14, i32 %62) #2 + %83 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 1 + store i32 %82, ptr addrspace(1) %83, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %84 = tail call i32 @air.mul24.s.i32(i32 %46, i32 %48) #2 + %85 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 2 + store i32 %84, ptr addrspace(1) %85, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %86 = tail call i32 @air.mad24.s.i32(i32 %46, i32 %48, i32 %62) #2 + %87 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 3 + store i32 %86, ptr addrspace(1) %87, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %88 = insertelement <2 x i32> undef, i32 %19, i64 0 + %89 = insertelement <2 x i32> %88, i32 %29, i64 1 + %90 = insertelement <2 x i32> undef, i32 %24, i64 0 + %91 = insertelement <2 x i32> %90, i32 %34, i64 1 + %92 = tail call <2 x i32> @air.mul24.u.v2i32(<2 x i32> %89, <2 x i32> %91) #2 + %93 = insertelement <2 x i32> undef, i32 %67, i64 0 + %94 = insertelement <2 x i32> %93, i32 %72, i64 1 + %95 = tail call <2 x i32> @air.mad24.u.v2i32(<2 x i32> %89, <2 x i32> %91, <2 x i32> %94) #2 + %96 = extractelement <2 x i32> %92, i64 0 + %97 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 4 + store i32 %96, ptr addrspace(1) %97, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %98 = extractelement <2 x i32> %92, i64 1 + %99 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 5 + store i32 %98, ptr addrspace(1) %99, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %100 = extractelement <2 x i32> %95, i64 0 + %101 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 6 + store i32 %100, ptr addrspace(1) %101, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %102 = extractelement <2 x i32> %95, i64 1 + %103 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 7 + store i32 %102, ptr addrspace(1) %103, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %104 = insertelement <3 x i32> undef, i32 %14, i64 0 + %105 = insertelement <3 x i32> %104, i32 %29, i64 1 + %106 = insertelement <3 x i32> %105, i32 %39, i64 2 + %107 = insertelement <3 x i32> undef, i32 %34, i64 0 + %108 = insertelement <3 x i32> %107, i32 %44, i64 1 + %109 = insertelement <3 x i32> %108, i32 %9, i64 2 + %110 = tail call <3 x i32> @air.mul24.u.v3i32(<3 x i32> %106, <3 x i32> %109) #2 + %111 = insertelement <3 x i32> undef, i32 %72, i64 0 + %112 = insertelement <3 x i32> %111, i32 %77, i64 1 + %113 = insertelement <3 x i32> %112, i32 %62, i64 2 + %114 = tail call <3 x i32> @air.mad24.u.v3i32(<3 x i32> %106, <3 x i32> %109, <3 x i32> %113) #2 + %115 = extractelement <3 x i32> %110, i64 0 + %116 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 8 + store i32 %115, ptr addrspace(1) %116, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %117 = extractelement <3 x i32> %110, i64 1 + %118 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 9 + store i32 %117, ptr addrspace(1) %118, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %119 = extractelement <3 x i32> %110, i64 2 + %120 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 10 + store i32 %119, ptr addrspace(1) %120, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %121 = extractelement <3 x i32> %114, i64 0 + %122 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 11 + store i32 %121, ptr addrspace(1) %122, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %123 = extractelement <3 x i32> %114, i64 1 + %124 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 12 + store i32 %123, ptr addrspace(1) %124, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %125 = extractelement <3 x i32> %114, i64 2 + %126 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 13 + store i32 %125, ptr addrspace(1) %126, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %127 = insertelement <4 x i32> undef, i32 %9, i64 0 + %128 = insertelement <4 x i32> %127, i32 %19, i64 1 + %129 = insertelement <4 x i32> %128, i32 %29, i64 2 + %130 = insertelement <4 x i32> %129, i32 %39, i64 3 + %131 = insertelement <4 x i32> undef, i32 %44, i64 0 + %132 = insertelement <4 x i32> %131, i32 %34, i64 1 + %133 = insertelement <4 x i32> %132, i32 %24, i64 2 + %134 = insertelement <4 x i32> %133, i32 %14, i64 3 + %135 = tail call <4 x i32> @air.mul24.u.v4i32(<4 x i32> %130, <4 x i32> %134) #2 + %136 = insertelement <4 x i32> undef, i32 %77, i64 0 + %137 = insertelement <4 x i32> %136, i32 %72, i64 1 + %138 = insertelement <4 x i32> %137, i32 %67, i64 2 + %139 = insertelement <4 x i32> %138, i32 %62, i64 3 + %140 = tail call <4 x i32> @air.mad24.u.v4i32(<4 x i32> %130, <4 x i32> %134, <4 x i32> %139) #2 + %141 = extractelement <4 x i32> %135, i64 0 + %142 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 14 + store i32 %141, ptr addrspace(1) %142, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %143 = extractelement <4 x i32> %135, i64 1 + %144 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 15 + store i32 %143, ptr addrspace(1) %144, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %145 = extractelement <4 x i32> %135, i64 2 + %146 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 16 + store i32 %145, ptr addrspace(1) %146, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %147 = extractelement <4 x i32> %135, i64 3 + %148 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 17 + store i32 %147, ptr addrspace(1) %148, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %149 = extractelement <4 x i32> %140, i64 0 + %150 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 18 + store i32 %149, ptr addrspace(1) %150, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %151 = extractelement <4 x i32> %140, i64 1 + %152 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 19 + store i32 %151, ptr addrspace(1) %152, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %153 = extractelement <4 x i32> %140, i64 2 + %154 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 20 + store i32 %153, ptr addrspace(1) %154, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %155 = extractelement <4 x i32> %140, i64 3 + %156 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 21 + store i32 %155, ptr addrspace(1) %156, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %157 = insertelement <2 x i32> undef, i32 %50, i64 0 + %158 = insertelement <2 x i32> %157, i32 %54, i64 1 + %159 = insertelement <2 x i32> undef, i32 %52, i64 0 + %160 = insertelement <2 x i32> %159, i32 %56, i64 1 + %161 = tail call <2 x i32> @air.mul24.s.v2i32(<2 x i32> %158, <2 x i32> %160) #2 + %162 = tail call <2 x i32> @air.mad24.s.v2i32(<2 x i32> %158, <2 x i32> %160, <2 x i32> %94) #2 + %163 = extractelement <2 x i32> %161, i64 0 + %164 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 22 + store i32 %163, ptr addrspace(1) %164, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %165 = extractelement <2 x i32> %161, i64 1 + %166 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 23 + store i32 %165, ptr addrspace(1) %166, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %167 = extractelement <2 x i32> %162, i64 0 + %168 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 24 + store i32 %167, ptr addrspace(1) %168, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %169 = extractelement <2 x i32> %162, i64 1 + %170 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 25 + store i32 %169, ptr addrspace(1) %170, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %171 = insertelement <3 x i32> undef, i32 %48, i64 0 + %172 = insertelement <3 x i32> %171, i32 %54, i64 1 + %173 = insertelement <3 x i32> %172, i32 %58, i64 2 + %174 = insertelement <3 x i32> undef, i32 %56, i64 0 + %175 = insertelement <3 x i32> %174, i32 %60, i64 1 + %176 = insertelement <3 x i32> %175, i32 %46, i64 2 + %177 = tail call <3 x i32> @air.mul24.s.v3i32(<3 x i32> %173, <3 x i32> %176) #2 + %178 = tail call <3 x i32> @air.mad24.s.v3i32(<3 x i32> %173, <3 x i32> %176, <3 x i32> %113) #2 + %179 = extractelement <3 x i32> %177, i64 0 + %180 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 26 + store i32 %179, ptr addrspace(1) %180, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %181 = extractelement <3 x i32> %177, i64 1 + %182 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 27 + store i32 %181, ptr addrspace(1) %182, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %183 = extractelement <3 x i32> %177, i64 2 + %184 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 28 + store i32 %183, ptr addrspace(1) %184, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %185 = extractelement <3 x i32> %178, i64 0 + %186 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 29 + store i32 %185, ptr addrspace(1) %186, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %187 = extractelement <3 x i32> %178, i64 1 + %188 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 30 + store i32 %187, ptr addrspace(1) %188, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %189 = extractelement <3 x i32> %178, i64 2 + %190 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 31 + store i32 %189, ptr addrspace(1) %190, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %191 = insertelement <4 x i32> undef, i32 %46, i64 0 + %192 = insertelement <4 x i32> %191, i32 %50, i64 1 + %193 = insertelement <4 x i32> %192, i32 %54, i64 2 + %194 = insertelement <4 x i32> %193, i32 %58, i64 3 + %195 = insertelement <4 x i32> undef, i32 %60, i64 0 + %196 = insertelement <4 x i32> %195, i32 %56, i64 1 + %197 = insertelement <4 x i32> %196, i32 %52, i64 2 + %198 = insertelement <4 x i32> %197, i32 %48, i64 3 + %199 = tail call <4 x i32> @air.mul24.s.v4i32(<4 x i32> %194, <4 x i32> %198) #2 + %200 = tail call <4 x i32> @air.mad24.s.v4i32(<4 x i32> %194, <4 x i32> %198, <4 x i32> %139) #2 + %201 = extractelement <4 x i32> %199, i64 0 + %202 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 32 + store i32 %201, ptr addrspace(1) %202, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %203 = extractelement <4 x i32> %199, i64 1 + %204 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 33 + store i32 %203, ptr addrspace(1) %204, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %205 = extractelement <4 x i32> %199, i64 2 + %206 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 34 + store i32 %205, ptr addrspace(1) %206, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %207 = extractelement <4 x i32> %199, i64 3 + %208 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 35 + store i32 %207, ptr addrspace(1) %208, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %209 = extractelement <4 x i32> %200, i64 0 + %210 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 36 + store i32 %209, ptr addrspace(1) %210, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %211 = extractelement <4 x i32> %200, i64 1 + %212 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 37 + store i32 %211, ptr addrspace(1) %212, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %213 = extractelement <4 x i32> %200, i64 2 + %214 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 38 + store i32 %213, ptr addrspace(1) %214, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + %215 = extractelement <4 x i32> %200, i64 3 + %216 = getelementptr inbounds i32, ptr addrspace(1) %80, i64 39 + store i32 %215, ptr addrspace(1) %216, align 4, !tbaa !23, !alias.scope !38, !noalias !39 + ret void +} + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare i32 @air.mul24.u.i32(i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare i32 @air.mad24.u.i32(i32, i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare i32 @air.mul24.s.i32(i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare i32 @air.mad24.s.i32(i32, i32, i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <2 x i32> @air.mul24.u.v2i32(<2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <2 x i32> @air.mad24.u.v2i32(<2 x i32>, <2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <3 x i32> @air.mul24.u.v3i32(<3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <3 x i32> @air.mad24.u.v3i32(<3 x i32>, <3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <4 x i32> @air.mul24.u.v4i32(<4 x i32>, <4 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <4 x i32> @air.mad24.u.v4i32(<4 x i32>, <4 x i32>, <4 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <2 x i32> @air.mul24.s.v2i32(<2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <2 x i32> @air.mad24.s.v2i32(<2 x i32>, <2 x i32>, <2 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <3 x i32> @air.mul24.s.v3i32(<3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <3 x i32> @air.mad24.s.v3i32(<3 x i32>, <3 x i32>, <3 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <4 x i32> @air.mul24.s.v4i32(<4 x i32>, <4 x i32>) local_unnamed_addr #1 + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare <4 x i32> @air.mad24.s.v4i32(<4 x i32>, <4 x i32>, <4 x i32>) local_unnamed_addr #1 + +attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" } +attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) } +attributes #2 = { nounwind willreturn memory(none) } + +!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} +!air.kernel = !{!9} +!air.compile_options = !{!17, !18, !19} +!llvm.ident = !{!20} +!air.version = !{!21} +!air.language_version = !{!22} + +!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 2]} +!1 = !{i32 1, !"wchar_size", i32 4} +!2 = !{i32 7, !"frame-pointer", i32 2} +!3 = !{i32 7, !"air.max_device_buffers", i32 31} +!4 = !{i32 7, !"air.max_constant_buffers", i32 31} +!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31} +!6 = !{i32 7, !"air.max_textures", i32 128} +!7 = !{i32 7, !"air.max_read_write_textures", i32 8} +!8 = !{i32 7, !"air.max_samplers", i32 16} +!9 = !{ptr @int24_products, !10, !11} +!10 = !{} +!11 = !{!12, !13, !14, !15, !16} +!12 = !{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", !"ux"} +!13 = !{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", !"int", !"air.arg_name", !"sx"} +!14 = !{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", !"zs"} +!15 = !{i32 3, !"air.buffer", !"air.location_index", i32 3, 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", !"out"} +!16 = !{i32 4, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint", !"air.arg_name", !"i"} +!17 = !{!"air.compile.denorms_disable"} +!18 = !{!"air.compile.fast_math_enable"} +!19 = !{!"air.compile.framebuffer_fetch_enable"} +!20 = !{!"Apple metal version 32023.922 (metalfe-32023.922.4)"} +!21 = !{i32 2, i32 8, i32 0} +!22 = !{!"Metal", i32 4, i32 0, i32 0} +!23 = !{!24, !24, i64 0} +!24 = !{!"int", !25, i64 0} +!25 = !{!"omnipotent char", !26, i64 0} +!26 = !{!"Simple C++ TBAA"} +!27 = !{!28} +!28 = distinct !{!28, !29, !"air-alias-scope-arg(0)"} +!29 = distinct !{!29, !"air-alias-scopes(int24_products)"} +!30 = !{!31, !32, !33} +!31 = distinct !{!31, !29, !"air-alias-scope-arg(1)"} +!32 = distinct !{!32, !29, !"air-alias-scope-arg(2)"} +!33 = distinct !{!33, !29, !"air-alias-scope-arg(3)"} +!34 = !{!31} +!35 = !{!28, !32, !33} +!36 = !{!32} +!37 = !{!28, !31, !33} +!38 = !{!33} +!39 = !{!28, !31, !32} diff --git a/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv b/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv index c0ee3b723..9fc9365d6 100644 --- a/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv +++ b/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv @@ -1586,6 +1586,8 @@ engine/ido_draw_order.ll ido_samples ok ok ok ok ok ok ok ok ok ok ok ok ok ok o engine/ido_draw_order.ll ido_full ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/ido_draw_order.ll ido_triple ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/ido_draw_order.ll ido_quintuple ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/int24_products.air.ll int24_products ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/int24_products.ll int24_products ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/ipo_primitive_order.air.ll ipo_fan ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/ipo_primitive_order.air.ll ipo_steps ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/ipo_primitive_order.air.ll ipo_mix ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok