1// RUN: %clang_cc1 %s -triple spir-unknown-unknown -finclude-default-header -cl-std=CL1.2 -emit-llvm -o - -O0 | FileCheck %s 2 3#pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : enable 4void test_int8(uchar4 ua, uchar4 ub, char4 sa, char4 sb) { 5 uint ur = arm_dot(ua, ub); 6 // CHECK: call spir_func i32 @_Z7arm_dotDv4_hS_ 7 int sr = arm_dot(sa, sb); 8 // CHECK: call spir_func i32 @_Z7arm_dotDv4_cS_ 9} 10#pragma OPENCL EXTENSION cl_arm_integer_dot_product_int8 : disable 11 12#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : enable 13void test_accumulate_int8(uchar4 ua, uchar4 ub, uint uc, char4 sa, char4 sb, int c) { 14 uint ur = arm_dot_acc(ua, ub, uc); 15 // CHECK: call spir_func i32 @_Z11arm_dot_accDv4_hS_j 16 int sr = arm_dot_acc(sa, sb, c); 17 // CHECK: call spir_func i32 @_Z11arm_dot_accDv4_cS_i 18} 19#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int8 : disable 20 21#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : enable 22void test_accumulate_int16(ushort2 ua, ushort2 ub, uint uc, short2 sa, short2 sb, int c) { 23 uint ur = arm_dot_acc(ua, ub, uc); 24 // CHECK: call spir_func i32 @_Z11arm_dot_accDv2_tS_j 25 int sr = arm_dot_acc(sa, sb, c); 26 // CHECK: call spir_func i32 @_Z11arm_dot_accDv2_sS_i 27} 28#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_int16 : disable 29 30#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : enable 31void test_accumulate_saturate_int8(uchar4 ua, uchar4 ub, uint uc, char4 sa, char4 sb, int c) { 32 uint ur = arm_dot_acc_sat(ua, ub, uc); 33 // CHECK: call spir_func i32 @_Z15arm_dot_acc_satDv4_hS_j 34 int sr = arm_dot_acc_sat(sa, sb, c); 35 // CHECK: call spir_func i32 @_Z15arm_dot_acc_satDv4_cS_i 36} 37#pragma OPENCL EXTENSION cl_arm_integer_dot_product_accumulate_saturate_int8 : disable 38 39