diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2020-07-30 13:29:04 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2020-07-30 13:29:04 -0700 |
commit | e4b851af1a4f3cb39fbfa1069e60e6931bb52b6d (patch) | |
tree | 6f16b2952d92e09d004b13e8a98105f8c1a43b5f | |
parent | c33bf1522fdda83620a438eb686f4812a6e6c03e (diff) |
herp derpcombine-constants
-rw-r--r-- | src/intel/compiler/brw_fs_combine_constants.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_combine_constants.cpp b/src/intel/compiler/brw_fs_combine_constants.cpp index 171b2cf7360..88ffbe18ece 100644 --- a/src/intel/compiler/brw_fs_combine_constants.cpp +++ b/src/intel/compiler/brw_fs_combine_constants.cpp @@ -406,6 +406,7 @@ fs_visitor::opt_combine_constants() break; case BRW_OPCODE_MAD: { +#if 0 if (inst->src[0].file == IMM) { if (!represent_src_as_imm(devinfo, &inst->src[0])) { add_candidate_immediate(&table, inst, ip, 0, true, idom, block, @@ -443,6 +444,22 @@ fs_visitor::opt_combine_constants() devinfo, const_ctx); } } +#else + bool represented_as_imm = false; + for (int i = 0; i < inst->sources; i++) { + if (inst->src[i].file != IMM) + continue; + + if (!represented_as_imm && i == 2 && + represent_src_as_imm(devinfo, &inst->src[i])) { + represented_as_imm = true; + continue; + } + + add_candidate_immediate(&table, inst, ip, i, true, idom, block, + devinfo, const_ctx); + } +#endif break; } |