https://bugs.llvm.org/show_bug.cgi?id=38289
Bug ID: 38289
Summary: LLVM miscompiles long double to unsigned long long
conversion
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: benny....@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org
$ cat fp.c
long double l = 10240000000000000256.000000L;
int main() {
__builtin_printf("%llu\n", (unsigned long long)l);
}
$ clang -O0 fp.c && ./a.out
10240000000000000256
$ clang -O1 fp.c && ./a.out
10239999935508381696
This only happens when no ssse3 is available. This started failing with
r329339,
but the bug is probably older. What happens is that instructions get scheduled
over a x87 control word store.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs