[llvm-bugs] [Bug 32177] New: Bug in APFloat::mod
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 7 16:37:47 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=32177
Bug ID: 32177
Summary: Bug in APFloat::mod
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Core LLVM classes
Assignee: unassignedbugs at nondot.org
Reporter: sanjoy at playingwithpointers.com
CC: llvm-bugs at lists.llvm.org
Running @test_a through -instcombine folds %val to 0.0, while at runtime
executing @test_b returns a non-zero value 185438208.000000. I suspect this is
a bug in APFloat::mod (though I do not speak floating point well enough to be
sure):
define float @test_a() {
entry:
%val = frem float 0x43cbfcd960000000, 0xc1e2b34a00000000
ret float %val
}
define float @helper(float %x, float %y) {
%val = frem float %x, %y
ret float %val
}
define external float @test_b() {
%val = call float @helper(float 0x43cbfcd960000000, float 0xc1e2b34a00000000)
ret float %val
}
Notably, IEEEFloat::mod says: "This is not currently correct in all cases".
--
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/20170308/42655ab4/attachment.html>
More information about the llvm-bugs
mailing list