================ @@ -1,48 +1,59 @@ -; RUN: llc -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv32v1.6-vulkan-unknown %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-DOT +; RUN: llc -O0 -mtriple=spirv32-vulkan-unknown -spirv-ext=+SPV_KHR_integer_dot_product %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-DOT +; RUN: llc -O0 -mtriple=spirv32-vulkan-unknown %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-EXP ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - -filetype=obj | spirv-val %} ; CHECK-DAG: %[[#int_32:]] = OpTypeInt 32 0 -; CHECK-DAG: %[[#int_8:]] = OpTypeInt 8 0 -; CHECK-DAG: %[[#zero:]] = OpConstantNull %[[#int_8]] -; CHECK-DAG: %[[#eight:]] = OpConstant %[[#int_8]] 8 -; CHECK-DAG: %[[#sixteen:]] = OpConstant %[[#int_8]] 16 -; CHECK-DAG: %[[#twentyfour:]] = OpConstant %[[#int_8]] 24 +; CHECK-EXP-DAG: %[[#int_8:]] = OpTypeInt 8 0 +; CHECK-EXP-DAG: %[[#zero:]] = OpConstantNull %[[#int_8]] +; CHECK-EXP-DAG: %[[#eight:]] = OpConstant %[[#int_8]] 8 +; CHECK-EXP-DAG: %[[#sixteen:]] = OpConstant %[[#int_8]] 16 +; CHECK-EXP-DAG: %[[#twentyfour:]] = OpConstant %[[#int_8]] 24 + ; CHECK-LABEL: Begin function test_dot define noundef i32 @test_dot(i32 noundef %a, i32 noundef %b, i32 noundef %c) { entry: ; CHECK: %[[#A:]] = OpFunctionParameter %[[#int_32]] ; CHECK: %[[#B:]] = OpFunctionParameter %[[#int_32]] ; CHECK: %[[#C:]] = OpFunctionParameter %[[#int_32]] +; Test that we use the dot product op when capabilities allow + +; CHECK-DOT: %[[#DOT:]] = OpDot %[[#int_32]] %[[#A]] %[[#B]] ---------------- s-perron wrote:
The extension should show up only if `-spirv-ext` is used. https://github.com/llvm/llvm-project/pull/113623 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits