[llvm-dev] Failing unit tests

Csaba Raduly via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 9 04:00:21 PDT 2017


I debugged divsc3_test.c

The test fails at i=0 , j=42

test__divsc3 (a=9.99999997e-07, b=9.99999997e-07, c=-0.5, d=-2)
r = -5.88235309e-07 + 3.52941186e-07 * I

classify (x=9.99999997e-07 + 9.99999997e-07 * I)  => 1 (non_zero)
classify (x=-0.5 + -2 * I) => 1 (non_zero)

classify (x=-5.88235309e-07 + 3.52941186e-07 * I) => 1 (non_zero)

z          =-5.88235253e-07 + 3.52941186e-07 * I
r           =-5.88235309e-07 + 3.52941186e-07 * I

which indeed is not equal to r

This is Ubuntu 14.04 LTS
$ uname -a
Linux 3.13.0-119-generic #166-Ubuntu SMP Wed May 3 12:18:55 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux

/proc/cpuinfo
processor    : 7
vendor_id    : GenuineIntel
cpu family    : 6
model        : 58
model name    : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
stepping    : 9
microcode    : 0x19
cpu MHz        : 3401.000
cache size    : 8192 KB
physical id    : 0
siblings    : 8
core id        : 3
cpu cores    : 4
apicid        : 7
initial apicid    : 7
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat
epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
fsgsbase smep erms
bogomips    : 6784.49
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

clang was built with the built-in gcc:

gcc version 4.8.5 (Ubuntu 4.8.5-2ubuntu1~14.04.1)


Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds


More information about the llvm-dev mailing list