-
Notifications
You must be signed in to change notification settings - Fork 13.6k
numerical differences in x87 fpu code generated by clang-14 and clang-15 #60837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-backend-x86 |
This regressed (or was maybe exposed) in 0af3e6a ("[InstCombine] Sink instructions with multiple users in a successor block") by @wweiandrew (cc @nikic @preames): $ ./pr60837-1-llvmorg-15-init-04973-gc236b41e451
a=0 b=0.1 c=0 d=0 abserr=0 relerr=0
a=0.1 b=0.1221239 c=0.1 d=0.1 abserr=0 relerr=0
a=0.2 b=0.14424779 c=0.055752218 d=0.055752218 abserr=0 relerr=0
a=0.3 b=0.16637169 c=0.13362832 d=0.13362832 abserr=0 relerr=0
a=0.4 b=0.18849558 c=0.023008853 d=0.023008853 abserr=0 relerr=0
a=0.5 b=0.21061946 c=0.078761071 d=0.078761071 abserr=0 relerr=0
a=0.6 b=0.23274337 c=0.13451329 d=0.13451329 abserr=0 relerr=0
a=0.7 b=0.25486726 c=0.19026548 d=0.19026548 abserr=0 relerr=0
a=0.8 b=0.27699116 c=0.24601769 d=0.24601769 abserr=0 relerr=0
a=0.9 b=0.29911503 c=0.0026548803 d=0.0026548803 abserr=0 relerr=0
$ ./pr60837-1-llvmorg-15-init-04974-g0af3e6a22da
a=0 b=0.1 c=0 d=0 abserr=0 relerr=0
a=0.1 b=0.1221239 c=0.1 d=0.1 abserr=0 relerr=0
a=0.2 b=0.14424779 c=0.055752218 d=0.055752218 abserr=0 relerr=0
a=0.3 b=0.16637169 c=0.13362832 d=0.13362832 abserr=0 relerr=0
a=0.4 b=0.18849558 c=0.023008853 d=0.023008853 abserr=0 relerr=0
a=0.5 b=0.21061946 c=0.078761071 d=0.078761071 abserr=0 relerr=0
a=0.6 b=0.23274337 c=0.13451327 d=0.13451329 abserr=1.49012e-08 relerr=6.4024e-08
a=0.7 b=0.25486726 c=0.19026548 d=0.19026548 abserr=0 relerr=0
a=0.8 b=0.27699116 c=0.24601772 d=0.24601769 abserr=-2.98023e-08 relerr=-1.07593e-07 FAIL Resulting assembly for fmod-llvmorg-15-init-04973-gc236b41e451.s.txt |
Uh oh!
There was an error while loading. Please reload this page.
As I've reported in Debian: https://bugs.debian.org/1031500
I've extracted a function (
_Z8_cl_fmodff
) from pocl generated bytecode (pocl_cl_fmod.ll
, part of the pocl OpenCL implementation offloat fmod(float,float)
) that produces different numeric results when compiled with lvm-14 and llvm-15. I've added a small C main to demonstrate that (main.c
,Makefile
).These numerical differences from pocl-3.1/llvm-15 cause test failures in pyopencl, libgpuarray.
This happens when generating 32-bit x87 fpu code with
-O2 --target=i386-unknown-linux-gnu -march=i686
.Please get the files from https://bugs.debian.org/1031500, GitHub refused any attachment type I tried.
The text was updated successfully, but these errors were encountered: