<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Sanjoy is out on vacation, but I'm going to look into this.  I'll be
    offline for about an hour, but should be able to start investigating
    by around 7pm.  On the surface, it looks like it should be an easy
    fix.  Hopefully, I'll have this resolved within a couple of hours. 
    Sorry for the breakage.  <br>
    <br>
    Philip<br>
    <br>
    <div class="moz-cite-prefix">On 05/21/2015 04:38 PM, Nick Lewycky
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADbEz-hgwfD3zFKSdddGZxK1GZbjZod2XrKqcsZQz4K7Es8avA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On 18 May 2015 at 11:07, Sanjoy Das <span
              dir="ltr"><<a moz-do-not-send="true"
                href="mailto:sanjoy@playingwithpointers.com"
                target="_blank">sanjoy@playingwithpointers.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author:
              sanjoy<br>
              Date: Mon May 18 13:07:00 2015<br>
              New Revision: 237593<br>
              <br>
              URL: <a moz-do-not-send="true"
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D237593-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=EZRvoJai0V1ZEULFLl3UFBFw3GpoHtruFDOok84hYrI&s=4QqYr7GqSrZjVxTSY4zWHbjeCHYmt-2bkaDpOtpbsM8&e="
                target="_blank">http://llvm.org/viewvc/llvm-project?rev=237593&view=rev</a><br>
              Log:<br>
              Exploit dereferenceable_or_null attribute in LICM pass<br>
              <br>
              Summary:<br>
              Allow hoisting of loads from values marked with
              dereferenceable_or_null<br>
              attribute. For values marked with the attribute perform<br>
              context-sensitive analysis to determine whether it's
              known-non-null or<br>
              not.<br>
            </blockquote>
            <div><br>
            </div>
            <div>This commit caused PR23608, see the testcase in that
              PR.</div>
            <div><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">-///
              Only sink or hoist an instruction if it is not a trapping
              instruction<br>
              +/// Only sink or hoist an instruction if it is not a
              trapping instruction,<br>
              +/// or if the instruction is known not to trap when moved
              to the preheader.<br>
               /// or if it is a trapping instruction and is guaranteed
              to execute.<br>
              -///<br>
              -static bool isSafeToExecuteUnconditionally(const
              Instruction &Inst,<br>
              +static bool isSafeToExecuteUnconditionally(const
              Instruction &Inst,<br>
                                                          const
              DominatorTree *DT,<br>
              +                                           const
              TargetLibraryInfo *TLI,<br>
                                                          const Loop
              *CurLoop,<br>
                                                          const
              LICMSafetyInfo *SafetyInfo) {<br>
              -  // If it is not a trapping instruction, it is always
              safe to hoist.<br>
              -  if (isSafeToSpeculativelyExecute(&Inst))<br>
              +  const Instruction *CtxI =
              CurLoop->getLoopPreheader()->getTerminator();<br>
            </blockquote>
            <div><br>
            </div>
            <div>A Loop* is not guaranteed to have a preheader, in which
              case CurLoop->getLoopPreheader() will return null.</div>
            <div><br>
            </div>
            <div>Nick</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">+ 
              if (isSafeToSpeculativelyExecute(&Inst, CtxI, DT,
              TLI))<br>
                   return true;<br>
              <br>
                 return isGuaranteedToExecute(Inst, DT, CurLoop,
              SafetyInfo);<br>
            </blockquote>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
            </blockquote>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>