diff options
author | Matt Turner <[email protected]> | 2015-08-18 14:28:03 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-08-28 11:30:47 -0700 |
commit | 8765f1d7ddfb00dc5b202e4e679ebe640a547d50 (patch) | |
tree | 911e862b6d8491fb0c9d4c3d05bd3451ee1364b3 /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 2581fe931a48478123d8054ce7a291cffa851de9 (diff) |
i965: Only consider fixed_hw_reg in equals() if file is HW_REG/IMM.
Noticed when debugging things that lead to the next patch.
On G45 (and presumably ILK) this helps register coalescing:
total instructions in shared programs: 4077373 -> 4077340 (-0.00%)
instructions in affected programs: 43751 -> 43718 (-0.08%)
helped: 52
HURT: 2
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 81009a09128..269914d64a8 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -427,7 +427,9 @@ fs_reg::equals(const fs_reg &r) const negate == r.negate && abs == r.abs && !reladdr && !r.reladdr && - memcmp(&fixed_hw_reg, &r.fixed_hw_reg, sizeof(fixed_hw_reg)) == 0 && + ((file != HW_REG && file != IMM) || + memcmp(&fixed_hw_reg, &r.fixed_hw_reg, + sizeof(fixed_hw_reg)) == 0) && stride == r.stride); } |