<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 19, 2017 at 12:47 PM, James Y Knight <span dir="ltr"><<a href="mailto:jyknight@google.com" target="_blank">jyknight@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Jun 19, 2017 at 12:34 PM, Mehdi AMINI via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">using `opt --print-after-all -O3` I see that EarlyCSE is interpreting the call to `ceil` and constant fold:<div><br></div><div><div>*** IR Dump After Early CSE ***</div><div>; Function Attrs: nobuiltin nounwind</div><div>define i1 @do_test() #2 {</div><span class="m_1303333775234128760gmail-"><div>Entry:</div><div>  %0 = call fastcc float @ceil(float 0.000000e+00) #6</div></span><span class="m_1303333775234128760gmail-"><div>  %1 = call fastcc float @ceil32(float 0.000000e+00) #6</div></span><div>  %2 = fcmp fast oeq float 0.000000e+00, %1</div><div>  ret i1 %2</div><div>}</div></div><div><br></div><div>So just running `opt -early-cse -debug` seems enough:</div><div><br></div><div><div>EarlyCSE Simplify:   %0 = call fastcc float @ceil(float 0.000000e+00) #6  to: float 0.000000e+00</div></div><div><br></div><div>I suspect it is not correct from EarlyCSE to do that.</div><span class="m_1303333775234128760gmail-HOEnZb"><font color="#888888"><div><br></div></font></span></div></blockquote><div><br></div></span><div>This was actually _just_ fixed:</div><div><a href="https://reviews.llvm.org/rL305132" target="_blank">https://reviews.llvm.org/<wbr>rL305132</a> </div></div></div></div></blockquote><div><br></div><div>Excellent. Is the fix included in llvm 4.0.1?</div><div> </div></div><br></div></div>