[llvm-bugs] [Bug 36682] New: A problem with optimizing std::signbit - int vs. (double)int

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 10 07:27:23 PST 2018


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: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180310/27321dd5/attachment.html>


More information about the llvm-bugs mailing list