1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
3 ;; The OpDot operands must be vectors; check that translating dot with
4 ;; scalar arguments does not result in OpDot.
5 ; CHECK-SPIRV-LABEL: %[[#]] = OpFunction %[[#]] None %[[#]]
6 ; CHECK-SPIRV: %[[#]] = OpFMul %[[#]] %[[#]] %[[#]]
7 ; CHECK-SPIRV-NOT: %[[#]] = OpDot %[[#]] %[[#]] %[[#]]
8 ; CHECK-SPIRV: OpFunctionEnd
10 define spir_kernel void @testScalar(float %f) {
12 %call = tail call spir_func float @_Z3dotff(float %f, float %f)
16 ;; The OpDot operands must be vectors; check that translating dot with
17 ;; vector arguments results in OpDot.
18 ; CHECK-SPIRV-LABEL: %[[#]] = OpFunction %[[#]] None %[[#]]
19 ; CHECK-SPIRV: %[[#]] = OpDot %[[#]] %[[#]] %[[#]]
20 ; CHECK-SPIRV: OpFunctionEnd
22 define spir_kernel void @testVector(<2 x float> %f) {
24 %call = tail call spir_func float @_Z3dotDv2_fS_(<2 x float> %f, <2 x float> %f)
28 declare spir_func float @_Z3dotff(float, float)
30 declare spir_func float @_Z3dotDv2_fS_(<2 x float>, <2 x float>)