intel/compiler: Set bits according to source file
On Gen >= 12, if src0 or src2 holds immediate value, we need set src[0/2]_is_imm bits instead of register file. Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -848,9 +848,19 @@ brw_alu3(struct brw_codegen *p, unsigned opcode, struct brw_reg dest,
|
||||
src2.file == BRW_IMMEDIATE_VALUE);
|
||||
|
||||
if (devinfo->gen >= 12) {
|
||||
brw_inst_set_3src_a1_src0_reg_file(devinfo, inst, src0.file);
|
||||
if (src0.file == BRW_IMMEDIATE_VALUE) {
|
||||
brw_inst_set_3src_a1_src0_is_imm(devinfo, inst, 1);
|
||||
} else {
|
||||
brw_inst_set_3src_a1_src0_reg_file(devinfo, inst, src0.file);
|
||||
}
|
||||
|
||||
brw_inst_set_3src_a1_src1_reg_file(devinfo, inst, src1.file);
|
||||
brw_inst_set_3src_a1_src2_reg_file(devinfo, inst, src2.file);
|
||||
|
||||
if (src2.file == BRW_IMMEDIATE_VALUE) {
|
||||
brw_inst_set_3src_a1_src2_is_imm(devinfo, inst, 1);
|
||||
} else {
|
||||
brw_inst_set_3src_a1_src2_reg_file(devinfo, inst, src2.file);
|
||||
}
|
||||
} else {
|
||||
brw_inst_set_3src_a1_src0_reg_file(devinfo, inst,
|
||||
src0.file == BRW_GENERAL_REGISTER_FILE ?
|
||||
|
Reference in New Issue
Block a user