Closed
Description
Bugzilla Link | 3316 |
Resolution | FIXED |
Resolved on | Apr 19, 2017 14:20 |
Version | trunk |
OS | MacOS X |
Reporter | LLVM Bugzilla Contributor |
CC | @RKSimon,@sanjoy |
Extended Description
Constant folding for 'frem' seems flaky for certain values. For example, "frem float 0.1, 1.0" returns -0.9 when constant folded:
define float @test1() {
entry:
%y = frem float 0x3FB99999A0000000, 1.0
ret float %y
}
@x = global float 0x3FB99999A0000000 ; float 0.1
define float @test2() {
%x = load float* @x
%y = frem float %x, 1.0
ret float %y
}