<div dir="ltr">Oh, you hoisted them backwards.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 4, 2016 at 12:13 PM, Sebastian Pop <span dir="ltr"><<a href="mailto:sebpop@gmail.com" target="_blank">sebpop@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Reduced test:<br>
<br>
$ opt -gvn-hoist hoist-call.ll<br>
Instruction does not dominate all uses!<br>
  %0 = call float @llvm.fabs.f32(float %__b)<br>
  %cmpinf10 = fcmp oeq float %0, 0x7FF0000000000000<br>
<br>
$ cat hoist-call.ll<br>
define void @__mulsc3(float %__b) minsize {<br>
entry:<br>
  br label %if.then<br>
<br>
if.then:                                          ; preds = %entry<br>
  br i1 undef, label %if.then8, label %lor.lhs.false<br>
<br>
lor.lhs.false:                                    ; preds = %if.then<br>
  %0 = call float @llvm.fabs.f32(float %__b) #2<br>
  %cmpinf7 = fcmp oeq float %0, 0x7FF0000000000000<br>
  unreachable<br>
<br>
if.then8:                                         ; preds = %if.then<br>
  %1 = call float @llvm.fabs.f32(float %__b) #2<br>
  %cmpinf10 = fcmp oeq float %1, 0x7FF0000000000000<br>
  ret void<br>
}<br>
<br>
declare float @llvm.fabs.f32(float)<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, Aug 4, 2016 at 1:28 PM, Sebastian Pop <<a href="mailto:sebpop@gmail.com">sebpop@gmail.com</a>> wrote:<br>
> Thanks Bruno for the testcase.<br>
> I was able to reproduce the fail with clang and the preprocessed file.<br>
> I will investigate the reason of the ICE, and send a patch to fix this problem.<br>
><br>
> Thanks,<br>
> Sebastian<br>
><br>
> On Thu, Aug 4, 2016 at 12:25 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>> wrote:<br>
>> I can't get gvn-hoist to fail on this testcase no matter what i do, even on<br>
>> darwin, with my own built clang at the same rev.<br>
>><br>
>><br>
>> On Thu, Aug 4, 2016 at 10:10 AM, Bruno Cardoso Lopes<br>
>> <<a href="mailto:bruno.cardoso@gmail.com">bruno.cardoso@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi Sebastian,<br>
>>><br>
>>> Attached the reproducer with a preprocessed and bitcode testcase. Let<br>
>>> me know if you need any help.<br>
>>><br>
>>> On Thu, Aug 4, 2016 at 7:30 AM, Sebastian Pop <<a href="mailto:sebpop@gmail.com">sebpop@gmail.com</a>> wrote:<br>
>>> > I will need a preprocessed file or a reduced testcase:<br>
>>> > with the same cmake options as the bot, I was not able to see the fail<br>
>>> > on x86_64-linux.<br>
>>> > This was both when compiling with the system's gcc 5.4 and clang 3.8.<br>
>>> > The fail may be related to the libc of the bot.<br>
>>> ><br>
>>> > Thanks,<br>
>>> > Sebastian<br>
>>> ><br>
>>> > On Thu, Aug 4, 2016 at 8:10 AM, Sebastian Pop <<a href="mailto:sebpop@gmail.com">sebpop@gmail.com</a>> wrote:<br>
>>> >> I am looking at this fail.<br>
>>> >> I think I have enough information from the bot on how to reproduce the<br>
>>> >> bug.<br>
>>> >><br>
>>> >> On Thu, Aug 4, 2016 at 12:44 AM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>><br>
>>> >> wrote:<br>
>>> >>><br>
>>> >>><br>
>>> >>> On Wed, Aug 3, 2016 at 10:17 PM, Bruno Cardoso Lopes<br>
>>> >>> <<a href="mailto:bruno.cardoso@gmail.com">bruno.cardoso@gmail.com</a>> wrote:<br>
>>> >>>><br>
>>> >>>> Hi Daniel,<br>
>>> >>>><br>
>>> >>>> On Wed, Aug 3, 2016 at 9:59 PM, Daniel Berlin <<a href="mailto:dberlin@dberlin.org">dberlin@dberlin.org</a>><br>
>>> >>>> wrote:<br>
>>> >>>> > so here's the super-curious question in my mind:<br>
>>> >>>> ><br>
>>> >>>> > Why didn't this break when this was enabled by default for like a<br>
>>> >>>> > month<br>
>>> >>>> > before :)<br>
>>> >>>><br>
>>> >>>> Not really sure why, I was not following the bots back then.<br>
>>> >>><br>
>>> >>><br>
>>> >>> Yeah, it's semi-rhetorical. It's just really odd, and makes me think<br>
>>> >>> it's<br>
>>> >>> related to one or more of the optimizations sebastian added (for<br>
>>> >>> example,<br>
>>> >>> not recomputing DFS numbers).<br>
>>> >>><br>
>>> >>>><br>
>>> >>>> Where<br>
>>> >>>> there many changes following up the time it got off? Another<br>
>>> >>>> possibility is that the bot could have been broken by another change<br>
>>> >>>> that hid this?<br>
>>> >>>> I can get my hands on the reproducer and send to you tomorrow if<br>
>>> >>>> that's<br>
>>> >>>> helpful.<br>
>>> >>>><br>
>>> >>><br>
>>> >>> That would be really helpful.<br>
>>> >>><br>
>>> >>>><br>
>>> >>>> -Bruno<br>
>>> >>>><br>
>>> >>>> --<br>
>>> >>>> Bruno Cardoso Lopes<br>
>>> >>>> <a href="http://www.brunocardoso.cc" rel="noreferrer" target="_blank">http://www.brunocardoso.cc</a><br>
>>> >>><br>
>>> >>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Bruno Cardoso Lopes<br>
>>> <a href="http://www.brunocardoso.cc" rel="noreferrer" target="_blank">http://www.brunocardoso.cc</a><br>
>><br>
>><br>
</div></div></blockquote></div><br></div>