Commit 95c28f83 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

When flipping arguments, also flip modifiers

parent a9e64b15
......@@ -1570,9 +1570,24 @@ embedded_to_inline_constant(compiler_context *ctx)
case midgard_alu_op_iand:
case midgard_alu_op_ior:
case midgard_alu_op_ixor:
/* Flip the SSA numbers */
ins->ssa_args.src0 = ins->ssa_args.src1;
ins->ssa_args.src1 = SSA_FIXED_REGISTER(REGISTER_CONSTANT);
/* And flip the modifiers */
unsigned src_temp;
if (ins->vector) {
src_temp = ins->vector_alu.src2;
ins->vector_alu.src2 = ins->vector_alu.src1;
ins->vector_alu.src1 = src_temp;
} else {
src_temp = ins->scalar_alu.src2;
ins->scalar_alu.src2 = ins->scalar_alu.src1;
ins->scalar_alu.src1 = src_temp;
}
default:
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment