[llvm-bugs] [Bug 40541] New: LLVM 8 stopped optimizing pow(2., x) to exp2(x)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 30 15:33:12 PST 2019


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

            Bug ID: 40541
           Summary: LLVM 8 stopped optimizing pow(2., x) to exp2(x)
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: e.menezes at samsung.com, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

We noticed this on 32-bit clang-cl builds.

#include <cmath>
float foo(double d) { return pow(2., d / 1200.); }

> d:\clang7.0.1\bin\clang-cl -m32 -O2 -c exp2.cpp
> dumpbin /all exp2.obj | findstr REL32
 00000017  REL32                      00000000         F  _exp2

> d:\clang8rc1\bin\clang-cl -m32 -O2 -c exp2.cpp
> dumpbin /all exp2.obj | findstr REL32
 0000002C  REL32                      00000000        11  _pow

At first glance I'm suspecting a bug in
https://github.com/llvm/llvm-project/commit/2123ea7d5c722e98ce0f047c8baa3fb3db23e6b3.

-- 
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/20190130/5ac8ac3c/attachment.html>


More information about the llvm-bugs mailing list