[llvm-bugs] [Bug 3316] Constant folding for 'frem' is flaky

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 31 06:25:44 PST 2017


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

simonbyrne at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |simonbyrne at gmail.com
         Resolution|FIXED                       |---

--- Comment #9 from simonbyrne at gmail.com ---
I'm seeing a similar problem, though for different constant values, in LLVM
3.9.1:

$ cat frem.ll
define double @test1() {
entry:
    %y = frem double 3.000000e-01, 1.000000e-02
    ret double %y
}

Compiled without optimisations gives the correct answer:

$ llc frem.ll && ./frem
0x1.47ae147ae1471p-7

However applying a constprop pass gives an incorrect answer:

$ opt -S -constprop frem.ll
; ModuleID = 'frem.ll'
source_filename = "frem.ll"

define double @test1() {
entry:
  ret double 0.000000e+00
}

downstream issue: https://github.com/JuliaLang/julia/issues/14089

-- 
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/20170131/4fc085c2/attachment.html>


More information about the llvm-bugs mailing list