Lines Matching refs:inst

44    foreach_inst_in_block_reverse_safe(vec4_instruction, inst, block) {
47 if ((inst->opcode != BRW_OPCODE_AND &&
48 inst->opcode != BRW_OPCODE_CMP &&
49 inst->opcode != BRW_OPCODE_MOV) ||
50 inst->predicate != BRW_PREDICATE_NONE ||
51 !inst->dst.is_null() ||
52 inst->src[0].file != VGRF ||
53 inst->src[0].abs)
56 if (inst->opcode == BRW_OPCODE_AND &&
57 !(inst->src[1].is_one() &&
58 inst->conditional_mod == BRW_CONDITIONAL_NZ &&
59 !inst->src[0].negate))
62 if (inst->opcode == BRW_OPCODE_CMP && !inst->src[1].is_zero())
65 if (inst->opcode == BRW_OPCODE_MOV &&
66 inst->conditional_mod != BRW_CONDITIONAL_NZ)
70 foreach_inst_in_block_reverse_starting_from(vec4_instruction, scan_inst, inst) {
71 if (regions_overlap(inst->src[0], inst->size_read(0),
74 scan_inst->dst.offset != inst->src[0].offset ||
78 inst->src[0].swizzle != BRW_SWIZZLE_XYZW) ||
79 (inst->dst.writemask & ~scan_inst->dst.writemask) != 0 ||
80 scan_inst->exec_size != inst->exec_size ||
81 scan_inst->group != inst->group) {
86 if (inst->conditional_mod == BRW_CONDITIONAL_NZ &&
88 (inst->dst.type == BRW_REGISTER_TYPE_D ||
89 inst->dst.type == BRW_REGISTER_TYPE_UD)) {
90 inst->remove(block);
98 if (inst->opcode == BRW_OPCODE_AND)
102 if (scan_inst->dst.type != inst->dst.type &&
104 inst->dst.type == BRW_REGISTER_TYPE_F))
107 /* If the instruction generating inst's source also wrote the
108 * flag, and inst is doing a simple .nz comparison, then inst
110 * register. Delete inst.
112 if (inst->conditional_mod == BRW_CONDITIONAL_NZ &&
113 !inst->src[0].negate &&
115 inst->remove(block);
134 inst->src[0].negate ? brw_swap_cmod(inst->conditional_mod)
135 : inst->conditional_mod;
141 inst->remove(block);