<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><span class="gmail-"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> broadcasts that get hoisted out of the loop, etc.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br></span>
    Can you elaborate? Do you mean that we're hoisting broadcasts
    outside of the trip-count check (i.e. speculatively executing them)
    and these are actually expensive operations? Is this is a cost-model
    problem being exposed by SimplifyCFG (which is hoisting these things
    outside of the trip-count check)?</div></blockquote><div><br></div><div>I'm pretty sure I've seen this happen. We're definitely hoisting them out of the loop (and relying on CGP and/or Loop Sinking to sink them back when profitable), but I also remember seeing the broadcasts executed in cases where the the iteration count was 0.</div><div><br></div><div>I'll see if I can come up with an example.</div></div></div></div>