[llvm-dev] LLVM behavior different depending on function symbol name

James Y Knight via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 19 09:47:32 PDT 2017


On Mon, Jun 19, 2017 at 12:34 PM, Mehdi AMINI via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> using `opt --print-after-all -O3` I see that EarlyCSE is interpreting the
> call to `ceil` and constant fold:
>
> *** IR Dump After Early CSE ***
> ; Function Attrs: nobuiltin nounwind
> define i1 @do_test() #2 {
> Entry:
>   %0 = call fastcc float @ceil(float 0.000000e+00) #6
>   %1 = call fastcc float @ceil32(float 0.000000e+00) #6
>   %2 = fcmp fast oeq float 0.000000e+00, %1
>   ret i1 %2
> }
>
> So just running `opt -early-cse -debug` seems enough:
>
> EarlyCSE Simplify:   %0 = call fastcc float @ceil(float 0.000000e+00) #6
>  to: float 0.000000e+00
>
> I suspect it is not correct from EarlyCSE to do that.
>
>
This was actually _just_ fixed:
https://reviews.llvm.org/rL305132
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170619/3fd1c227/attachment.html>


More information about the llvm-dev mailing list