https://bugs.llvm.org/show_bug.cgi?id=36682

            Bug ID: 36682
           Summary: A problem with optimizing std::signbit - int vs.
                    (double)int
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: llvm-bugs@lists.llvm.org

Was looking at using clang-cl for compiling the project on windows.
Got hit by the 'call to 'signbit' is ambiguous' problem.

As per http://en.cppreference.com/w/cpp/numeric/math/signbit
"4) A set of overloads or a function template accepting the arg argument of any
integral type. Equivalent to (2) (the argument is cast to double)."

So there should not be any difference between passing an integer, and that same
integer explicitly cast to double, right?

Right now the explicitly-casted version is not so optimized, the conversion to
double is kept:
https://godbolt.org/g/6V246d

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to