diff options
author | Jason Ekstrand <[email protected]> | 2017-10-04 13:49:29 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-10-17 16:59:02 +0100 |
commit | 4ae1a62b26d4a615391fcef25f3e434822523e38 (patch) | |
tree | cad156d9222e0fcafd936a01cb1977a5212a3ea2 /src/intel | |
parent | ea3ad52ad3fce7dc37a1f415efdfe8727791613d (diff) |
intel/compiler: Don't cmod propagate into a saturated operation
Shader-db results on Sky Lake:
total instructions in shared programs: 12954445 -> 12955125 (0.01%)
instructions in affected programs: 141862 -> 142542 (0.48%)
helped: 0
HURT: 626
Reviewed-by: Matt Turner <[email protected]>
Cc: [email protected]
(cherry picked from commit b91ecee04ab2a5b23ff2418b4d709252878cf894)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/compiler/brw_fs_cmod_propagation.cpp | 8 | ||||
-rw-r--r-- | src/intel/compiler/brw_vec4_cmod_propagation.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_cmod_propagation.cpp b/src/intel/compiler/brw_fs_cmod_propagation.cpp index 2d50c92e9e3..db63e942b75 100644 --- a/src/intel/compiler/brw_fs_cmod_propagation.cpp +++ b/src/intel/compiler/brw_fs_cmod_propagation.cpp @@ -142,6 +142,14 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block) scan_inst->opcode == BRW_OPCODE_CMPN) break; + /* From the Sky Lake PRM Vol. 7 "Assigning Conditional Mods": + * + * * Note that the [post condition signal] bits generated at + * the output of a compute are before the .sat. + */ + if (scan_inst->saturate) + break; + /* Otherwise, try propagating the conditional. */ enum brw_conditional_mod cond = inst->src[0].negate ? brw_swap_cmod(inst->conditional_mod) diff --git a/src/intel/compiler/brw_vec4_cmod_propagation.cpp b/src/intel/compiler/brw_vec4_cmod_propagation.cpp index 4454cdbfc94..05e65168193 100644 --- a/src/intel/compiler/brw_vec4_cmod_propagation.cpp +++ b/src/intel/compiler/brw_vec4_cmod_propagation.cpp @@ -129,6 +129,14 @@ opt_cmod_propagation_local(bblock_t *block) scan_inst->opcode == BRW_OPCODE_CMPN) break; + /* From the Sky Lake PRM Vol. 7 "Assigning Conditional Mods": + * + * * Note that the [post condition signal] bits generated at + * the output of a compute are before the .sat. + */ + if (scan_inst->saturate) + break; + /* Otherwise, try propagating the conditional. */ enum brw_conditional_mod cond = inst->src[0].negate ? brw_swap_cmod(inst->conditional_mod) |