break;
}
+ case nir_op_sdot_4x8_iadd:
+ case nir_op_udot_4x8_uadd:
+ case nir_op_sdot_4x8_iadd_sat:
+ case nir_op_udot_4x8_uadd_sat: {
+ const char *name = instr->op == nir_op_sdot_4x8_iadd ||
+ instr->op == nir_op_sdot_4x8_iadd_sat
+ ? "llvm.amdgcn.sdot4" : "llvm.amdgcn.udot4";
+ src[3] = LLVMConstInt(ctx->ac.i1, instr->op == nir_op_sdot_4x8_iadd_sat ||
+ instr->op == nir_op_udot_4x8_uadd_sat, false);
+ result = ac_build_intrinsic(&ctx->ac, name, def_type, src, 4, AC_FUNC_ATTR_READNONE);
+ break;
+ }
+
+ case nir_op_sdot_2x16_iadd:
+ case nir_op_udot_2x16_uadd:
+ case nir_op_sdot_2x16_iadd_sat:
+ case nir_op_udot_2x16_uadd_sat: {
+ const char *name = instr->op == nir_op_sdot_2x16_iadd ||
+ instr->op == nir_op_sdot_2x16_iadd_sat
+ ? "llvm.amdgcn.sdot2" : "llvm.amdgcn.udot2";
+ src[0] = LLVMBuildBitCast(ctx->ac.builder, src[0], ctx->ac.v2i16, "");
+ src[1] = LLVMBuildBitCast(ctx->ac.builder, src[1], ctx->ac.v2i16, "");
+ src[3] = LLVMConstInt(ctx->ac.i1, instr->op == nir_op_sdot_2x16_iadd_sat ||
+ instr->op == nir_op_udot_2x16_uadd_sat, false);
+ result = ac_build_intrinsic(&ctx->ac, name, def_type, src, 4, AC_FUNC_ATTR_READNONE);
+ break;
+ }
+
default:
fprintf(stderr, "Unknown NIR alu instr: ");
nir_print_instr(&instr->instr, stderr);