Lines Matching full:inst_add
452 struct rc_instruction * inst_add,
462 rc_get_readers(c, inst_add, &reader_data, presub_scan_read, NULL,
476 presub_replace(inst_add, reader.Inst, src_index);
482 /* This function assumes that inst_add->U.I.SrcReg[0] and
483 * inst_add->U.I.SrcReg[1] aren't both negative. */
485 struct rc_instruction * inst_add,
490 if (inst_add->U.I.SrcReg[1].Negate || inst_add->U.I.SrcReg[0].Negate)
495 if (inst_add->U.I.SrcReg[1].Negate) {
496 inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[1];
497 inst_reader->U.I.PreSub.SrcReg[1] = inst_add->U.I.SrcReg[0];
499 inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[0];
500 inst_reader->U.I.PreSub.SrcReg[1] = inst_add->U.I.SrcReg[1];
564 struct rc_instruction * inst_add)
566 unsigned dstmask = inst_add->U.I.DstReg.WriteMask;
567 unsigned src0_neg = inst_add->U.I.SrcReg[0].Negate & dstmask;
568 unsigned src1_neg = inst_add->U.I.SrcReg[1].Negate & dstmask;
570 if (inst_add->U.I.SrcReg[0].Swizzle != inst_add->U.I.SrcReg[1].Swizzle)
574 if (inst_add->U.I.SrcReg[0].Abs || inst_add->U.I.SrcReg[1].Abs)
578 inst_add->U.I.SrcReg[0].Negate && inst_add->U.I.SrcReg[1].Negate)
582 if (inst_add->U.I.SrcReg[0].Negate && src0_neg != dstmask)
586 if (inst_add->U.I.SrcReg[1].Negate && src1_neg != dstmask)
589 if (!is_presub_candidate(c, inst_add))
592 if (presub_helper(c, inst_add, RC_PRESUB_ADD, presub_replace_add)) {
593 rc_remove_instruction(inst_add);
600 struct rc_instruction * inst_add,
604 /* We must be careful not to modify inst_add, since it
606 inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[1];
628 struct rc_instruction * inst_add)
632 if (!is_presub_candidate(c, inst_add))
639 swz = GET_SWZ(inst_add->U.I.SrcReg[0].Swizzle, i);
640 if(((1 << i) & inst_add->U.I.DstReg.WriteMask)
647 if ((inst_add->U.I.SrcReg[1].Negate & inst_add->U.I.DstReg.WriteMask) !=
648 inst_add->U.I.DstReg.WriteMask
649 || inst_add->U.I.SrcReg[1].Abs
650 || (inst_add->U.I.SrcReg[1].File != RC_FILE_TEMPORARY
651 && inst_add->U.I.SrcReg[1].File != RC_FILE_CONSTANT)
652 || src_has_const_swz(inst_add->U.I.SrcReg[1])) {
657 if (presub_helper(c, inst_add, RC_PRESUB_INV, presub_replace_inv)) {
658 rc_remove_instruction(inst_add);