On 5 December 2011 11:54, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 12/05/2011 09:40 AM, Paul Berry wrote:<br>
> Normally when outputting instructions in SPF (single program flow)<br>
> mode, we convert IF and ELSE instructions to conditional ADD<br>
> instructions applied to the IP register, since this lets us avoid<br>
> having to emit an ENDIF instruction (and, in Gen4, lets us avoid using<br>
> up precious space in the MaskStack).<br>
><br>
> However, according to the SandyBridge PRM (Volume 4 part 2, p79):<br>
><br>
> [Errata DevSNB{WA}] - When SPF is ON, IP may not be updated by<br>
> non-flow control instructions.<br>
><br>
> So we have to disable this optimization on Gen6.<br>
><br>
> The reason we never noticed this problem before is that so far we<br>
> haven't needed to use SPF mode on Gen6. However, later patches in<br>
> this series will introduce a Gen6 GS program which uses SPF mode.<br>
<br>
</div>I'm wondering if this is broken on Gen7+ as well. It might be better to<br>
just disable this optimization on intel->gen >= 6 altogether. I'm<br>
honestly not sure it provides much benefit post-Ironlake.<br></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
We could also test it on Ivybridge; if it works, I'm not opposed to<br>
leaving it enabled either.<br>
</blockquote></div><br>
Yeah, I think you're right. My preference would be to just go ahead and disable the optimization on gen>=6 and be done with it; I don't think much would be gained from testing on IvyBridge at this point.<br>