i965: Allow commuting the operands of ADDC for const propagation.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner
2013-11-27 16:14:14 -08:00
parent 04d83396ee
commit b1eb2ad8d1
2 changed files with 2 additions and 2 deletions
@@ -348,7 +348,6 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
case BRW_OPCODE_ASR:
case BRW_OPCODE_SHL:
case BRW_OPCODE_SHR:
case BRW_OPCODE_ADDC:
case BRW_OPCODE_SUBB:
if (i == 1) {
inst->src[i] = entry->src;
@@ -362,6 +361,7 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
case BRW_OPCODE_OR:
case BRW_OPCODE_AND:
case BRW_OPCODE_XOR:
case BRW_OPCODE_ADDC:
if (i == 1) {
inst->src[i] = entry->src;
progress = true;
@@ -99,7 +99,6 @@ try_constant_propagation(vec4_instruction *inst, int arg, src_reg *values[4])
case BRW_OPCODE_ASR:
case BRW_OPCODE_SHL:
case BRW_OPCODE_SHR:
case BRW_OPCODE_ADDC:
case BRW_OPCODE_SUBB:
if (arg == 1) {
inst->src[arg] = value;
@@ -113,6 +112,7 @@ try_constant_propagation(vec4_instruction *inst, int arg, src_reg *values[4])
case BRW_OPCODE_OR:
case BRW_OPCODE_AND:
case BRW_OPCODE_XOR:
case BRW_OPCODE_ADDC:
if (arg == 1) {
inst->src[arg] = value;
return true;