It may be possible to create a contrived example in which a 3-src
instruction would have been compacted on Gen < 8. I'd rather not
discover it in the wild.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
return false;
}
- if (brw->gen >= 8 && is_3src(brw_inst_opcode(brw, src))) {
- memset(&temp, 0, sizeof(temp));
- if (brw_try_compact_3src_instruction(brw, &temp, src)) {
- *dst = temp;
- return true;
+ if (is_3src(brw_inst_opcode(brw, src))) {
+ if (brw->gen >= 8) {
+ memset(&temp, 0, sizeof(temp));
+ if (brw_try_compact_3src_instruction(brw, &temp, src)) {
+ *dst = temp;
+ return true;
+ } else {
+ return false;
+ }
} else {
return false;
}