diff options
author | Eric Anholt <[email protected]> | 2010-10-05 10:25:22 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-06 09:33:26 -0700 |
commit | 634abbf7b2e6ea21db30aafc0de9472ee31d4173 (patch) | |
tree | 0078aea75b3b0da822056b5370fd24db71b72f94 /src | |
parent | dcd0261affc293b75d231e612091ec7b1076fff6 (diff) |
i965: Also do constant propagation for the second operand of CMP.
We could do the first operand as well by flipping the comparison, but
this covered several CMPs in code I was looking at.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 0c9f17f8fdc..914141a3978 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2607,6 +2607,11 @@ fs_visitor::propagate_constants() scan_inst->src[1] = inst->src[0]; } break; + case BRW_OPCODE_CMP: + if (i == 1) { + scan_inst->src[i] = inst->src[0]; + progress = true; + } } } |