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: unassignedclangb...@nondot.org
          Reporter: dma...@mozilla.com
                CC: e.mene...@samsung.com, htmldevelo...@gmail.com,
                    llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to