Commit 069901e2 authored by Emma Anholt's avatar Emma Anholt
Browse files

i965/fs: Allow constant propagation into IF with embedded compare.

This saves a couple of instructions on most programs with control
flow.  More interestingly, 6 shaders from unigine sanctuary now fit
into 16-wide without register spilling.
parent 6a1e19d0
......@@ -1144,6 +1144,7 @@ fs_visitor::propagate_constants()
break;
case BRW_OPCODE_CMP:
case BRW_OPCODE_IF:
if (i == 1) {
scan_inst->src[i] = inst->src[0];
progress = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment