<div dir="ltr">+1.<div><br><div>I actually don't think we'll come to any sane conclusion on the unreachable code front anytime soon, the most likely conclusion is we keep on trucking and fix what breaks until it becomes too hard to do so, then reevaluate with real data since we last tried :)</div><div><br></div><div>If that means some passes need to do a quick cleanup pre-pass to avoid massive messes in their algorithms, that sounds like the right thing to me.</div><div>If most passes really are expecting/dealing with unreachable code, that really shouldn't be too bad.</div><div>If it becomes too expensive or whatever, we reevaluate whether it's the right set of tradeoffs.</div><div><br></div><div>Whether current GVN is one of those algorithms where it's better to do a pre-pass cleanup,  i can't say.  It actually seems pretty easy to just not walk into blocks that have no preds  when generating the RPO order in iterateOnFunction. </div><div>I don't see the disadvantage.<br></div><div><br></div><div><br></div><div>The new algorithm i have already skips unreachable blocks anyway because it does unreachable block detecting, so it's handling them.</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 4:32 PM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <span style="font-size:14.0pt;font-family:"Cambria","serif"">Personally,
      I would prefer to see the short term fix implemented as his "(2)
      GVN should skip unreachable code;". <br>
      <br>
      Given there's already a pre-pass merging blocks into their
      predecessor, simply deleting blocks which aren't reachable
      (according to the dom tree) seems quite straight forward and
      inexpensive.<span class="HOEnZb"><font color="#888888"><br>
      <br>
      Philip<br>
      <br>
      <br>
    </font></span></span><div><div class="h5">
    <div>On 03/19/2015 05:10 PM, Gao, Yunzhong
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal"><span style="color:#1f497d">Hi,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">Sorry to
            re-open an old thread here. We have a compiler based on LLVM
            3.6 branch, and the compiler hangs<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">when compiling
            one of our games due to this bug. I am aware that there is
            on-going discussion in llvmdev<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">regarding the
            long-term solution of the general design of LLVM passes,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d"> <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150223/261463.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150223/261463.html</a><u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">, which looks
            like it will take a while before any consensus is reached. I
            wonder if Katya’s patch could serve as a<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">stop-gap
            solution for the short term.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">What do you
            think?<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d">- Gao<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
        <div>
          <div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
                <a href="mailto:llvm-commits-bounces@cs.uiuc.edu" target="_blank">llvm-commits-bounces@cs.uiuc.edu</a>
                [<a href="mailto:llvm-commits-bounces@cs.uiuc.edu" target="_blank">mailto:llvm-commits-bounces@cs.uiuc.edu</a>]
                <b>On Behalf Of </b>Romanova, Katya<br>
                <b>Sent:</b> Sunday, February 22, 2015 1:35 AM<br>
                <b>To:</b> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
                <b>Subject:</b> Jump Theading/GVN bug<u></u><u></u></span></p>
          </div>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Hello,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">I
            encountered a problem triggered by Jump-Threading
            optimization.  This pass is creating an unreachable block
            with an instruction that is not well formed, which then
            causes the subsequent GVN pass to enter an infinite loop.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Here
            are the details:<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Consider
            the following small testcase. I reduced it from a huge
            project that was failing during LTO. Unfortunately,  I was
            not given any source files, only the bitcode.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal">-----------------------------------------------------------------------------<u></u><u></u></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">small.ll<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">----------------------------------------------------------------<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">%"class.ls_file::Path"
            = type { [1024 x i8], i8*, i8*, i8*}<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">;
            Function Attrs: nounwind sspstrong uwtable<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">define
            void @foo(%"class.ls_file::Path"* %this, i8* nocapture
            readonly %pPath) #0 {<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %1 = load i8* %pPath, align 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  switch
            i8 %1, label %.loopexit.i.i [<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 92, label %2<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 47, label %2<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            ]
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">;
            <label>:2                                       ;
            preds = %0, %0<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %3 = load i8* %pPath, align 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  %4
            = icmp eq i8 %3, 46<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            br i1 %4, label %.critedge.i.i, label %.outer.i.i
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">.critedge.i.i:                                   
            ; preds = %.critedge.i.i, %.critedge.i.i, %2<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %.0.i.i = phi i8* [ %pPath, %2 ], [ %5, %.critedge.i.i ], [
            %5, %.critedge.i.i ]<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %5 = getelementptr inbounds i8* %.0.i.i, i64 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  %6
            = load i8* %5, align 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  switch
            i8 %6, label %.outer.i.i [<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 92, label %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 47, label %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            ]
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">.outer.i.i:                                      
            ; preds = %.critedge.i.i, %2<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %.2.ph2.i.i = phi i8* [ %5, %.critedge.i.i ], [ %pPath, %2 ]<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %7 = load i8* %.2.ph2.i.i, align 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  %8
            = icmp eq i8 %7, 0
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  br
            label %.loopexit.i.i
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">.loopexit.i.i:                                   
            ; preds = %7<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            ret void
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">}<u></u><u></u></span></p>
        <div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0in 0in 1.0pt 0in">
          <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        </div>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">If
            you run GVN after jump threading, opt will go into infinite
            recursion.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">opt 
            -jump-threading small.ll -o test2.o<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">opt
            -gvn test2.o -o test3.o<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Segmentation
            fault (core dumped)<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Here’s
            why it’s happening:<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Jump
            threading transforms this block:<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">.critedge.i.i:                                   
            ; preds = %.critedge.i.i, %.critedge.i.i, %2<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %.0.i.i = phi i8* [ %pPath, %2 ], [ %5, %.critedge.i.i ], [
            %5, %.critedge.i.i ]<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %5 = getelementptr inbounds i8* %.0.i.i, i64 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  %6
            = load i8* %5, align 1
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">  switch
            i8 %6, label %.outer.i.i [<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 92, label %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 47, label %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            ]
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">into
            the following block:<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">.critedge.i.i:                                   
            ; preds = %.critedge.i.i, %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %2 = getelementptr inbounds i8* %2, i64 1<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            %3 = load i8* %2, align 1<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            switch i8 %3, label %.outer.i.i [<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 92, label %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">   
            i8 47, label %.critedge.i.i<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> 
            ]<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Note
            that the block .critedge.i.i is now unreachable and it
            contains the following instruction:<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">%2
            = getelementptr inbounds i8* %2, i64 1                   <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">This
            instruction doesn’t appear to be well formed. However, one
            could argue that it is – formally %2 def does dominate all
            %2 uses because both are located in an unreachable block, so
            every path to the use is passing through the def (because
            there are 0 paths like that).<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">That
            is likely the reason why –verify doesn’t complain about it.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">And
            this is where the problem actually happens:<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">When
            -gvn pass is invoked afterwards, it goes into an infinite
            recursion in function ‘<span style="background:white">PHITranslateSubExpr</span>’
            (located in PHITransAddr.cpp). When processing a GEP
            instruction (%2), this function calls itself recursively
            with its first operand (which is also %2).<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white">//
            Handle getelementptr with at least one PHI translatable
            operand.<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white"> 
            if (GetElementPtrInst *GEP =
            dyn_cast<GetElementPtrInst>(Inst)) {<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white">   
            SmallVector<Value*, 8> GEPOps;<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white">   
            bool AnyChanged = false;<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white">   
            for (unsigned i = 0, e = GEP->getNumOperands(); i != e;
            ++i) {<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white">     
            Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i),
            CurBB, PredBB, DT);                     // <- it goes
            into infinite recursion here.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif";background:white">     
            if (GEPOp == 0) return 0;</span><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">There
            are several different ways to fix this problem.
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p><span style="font-size:14.0pt;font-family:"Cambria","serif""><span>(1)<span style="font:7.0pt "Times New Roman"">                       
              </span></span></span><span style="font-size:14.0pt;font-family:"Cambria","serif"">We
            have to remove the unreachable code immediately after or
            during Jump-Threading pass;<u></u><u></u></span></p>
        <p><span style="font-size:14.0pt;font-family:"Cambria","serif""><span>(2)<span style="font:7.0pt "Times New Roman"">                       
              </span></span></span><span style="font-size:14.0pt;font-family:"Cambria","serif"">GVN
            should skip unreachable code;<u></u><u></u></span></p>
        <p><span style="font-size:14.0pt;font-family:"Cambria","serif""><span>(3)<span style="font:7.0pt "Times New Roman"">                       
              </span></span></span><span style="font-size:14.0pt;font-family:"Cambria","serif"">GVN
            shouldn’t recursively invoke the same function with the same
            arguments. 
            <u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Here
            is an extra check that implements the 3<sup>rd</sup>
            approach. Please review.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal">===================================================================<u></u><u></u></p>
        <p class="MsoNormal">--- PHITransAddr.cpp    (revision 229821)<u></u><u></u></p>
        <p class="MsoNormal">+++ PHITransAddr.cpp    (working copy)<u></u><u></u></p>
        <p class="MsoNormal">@@ -217,10 +217,13 @@<u></u><u></u></p>
        <p class="MsoNormal">     SmallVector<Value*, 8> GEPOps;<u></u><u></u></p>
        <p class="MsoNormal">     bool AnyChanged = false;<u></u><u></u></p>
        <p class="MsoNormal">     for (unsigned i = 0, e =
          GEP->getNumOperands(); i != e; ++i) {<u></u><u></u></p>
        <p class="MsoNormal">-      Value *GEPOp =
          PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT);<u></u><u></u></p>
        <p class="MsoNormal">+      Value *Operand=
          GEP->getOperand(i);<u></u><u></u></p>
        <p class="MsoNormal">+      if (GEP==Operand)<u></u><u></u></p>
        <p class="MsoNormal">+        continue;<u></u><u></u></p>
        <p class="MsoNormal">+      Value *GEPOp =
          PHITranslateSubExpr(Operand, CurBB, PredBB, DT);<u></u><u></u></p>
        <p class="MsoNormal">       if (!GEPOp) return nullptr;<u></u><u></u></p>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p class="MsoNormal">-      AnyChanged |= GEPOp !=
          GEP->getOperand(i);<u></u><u></u></p>
        <p class="MsoNormal">+      AnyChanged |= GEPOp != Operand;<u></u><u></u></p>
        <p class="MsoNormal">       GEPOps.push_back(GEPOp);<u></u><u></u></p>
        <p class="MsoNormal">     }<u></u><u></u></p>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p class="MsoNormal"><span style="font-family:"Cambria","serif"">===================================================================</span><u></u><u></u></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">One
            thing to note here is – unreachable code, if not removed,
            could push invalid code through subsequent passes. This
            invalid code will not be caught by the verifier. If  these
            passes are not paranoid enough, the bad code may cause all
            sorts of issues. The case above is one example.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif"">Katya.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:14.0pt;font-family:"Cambria","serif""> <u></u><u></u></span></p>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>