ac/nir: fix nir_op_unpack_64_2x32_split_y emission
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 1 Aug 2017 01:31:54 +0000 (18:31 -0700)
committerConnor Abbott <cwabbott0@gmail.com>
Tue, 1 Aug 2017 19:20:49 +0000 (12:20 -0700)
This was broken thanks to a typo in b2367cf.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_nir_to_llvm.c

index 19b1ef07155d97ddea0124381ca9e87b3d4ee16d..a05fd0e9cbe6a056921587abe9869dbfb83e3f1b 100644 (file)
@@ -1895,7 +1895,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
                                                    LLVMVectorType(ctx->ac.i32, 2),
                                                    "");
                result = LLVMBuildExtractElement(ctx->ac.builder, tmp,
-                                                ctx->ac.i32_0, "");
+                                                ctx->ac.i32_1, "");
                break;
        }