case nir_op_fddy_coarse:
result = emit_ddxy(ctx, instr->op, src[0]);
break;
+
+ case nir_op_unpack_64_2x32_split_x: {
+ assert(instr->src[0].src.ssa->num_components == 1);
+ LLVMValueRef tmp = LLVMBuildBitCast(ctx->builder, src[0],
+ LLVMVectorType(ctx->i32, 2),
+ "");
+ result = LLVMBuildExtractElement(ctx->builder, tmp,
+ ctx->i32zero, "");
+ break;
+ }
+
+ case nir_op_unpack_64_2x32_split_y: {
+ assert(instr->src[0].src.ssa->num_components == 1);
+ LLVMValueRef tmp = LLVMBuildBitCast(ctx->builder, src[0],
+ LLVMVectorType(ctx->i32, 2),
+ "");
+ result = LLVMBuildExtractElement(ctx->builder, tmp,
+ ctx->i32one, "");
+ break;
+ }
+
+ case nir_op_pack_64_2x32_split: {
+ LLVMValueRef tmp = LLVMGetUndef(LLVMVectorType(ctx->i32, 2));
+ tmp = LLVMBuildInsertElement(ctx->builder, tmp,
+ src[0], ctx->i32zero, "");
+ tmp = LLVMBuildInsertElement(ctx->builder, tmp,
+ src[1], ctx->i32one, "");
+ result = LLVMBuildBitCast(ctx->builder, tmp, ctx->i64, "");
+ break;
+ }
+
default:
fprintf(stderr, "Unknown NIR alu instr: ");
nir_print_instr(&instr->instr, stderr);