projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcd0261
)
i965: Also do constant propagation for the second operand of CMP.
author
Eric Anholt
<eric@anholt.net>
Tue, 5 Oct 2010 17:25:22 +0000
(10:25 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 6 Oct 2010 16:33:26 +0000
(09:33 -0700)
We could do the first operand as well by flipping the comparison, but
this covered several CMPs in code I was looking at.
src/mesa/drivers/dri/i965/brw_fs.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_fs.cpp
b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 0c9f17f8fdc7a21b9792bf264231213fcf891822..914141a39785a63448360c3a7bab8f20eb7625e9 100644
(file)
--- 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;
+ }
}
}