Issue 131343
Summary [LLVM-IR] long/ulong to floating point conversion is giving wrong results for cortex-a9
Labels new issue
Assignees
Reporter MrcSnm
    ```c
extern void sceClibPrintf(const char* fmt, ...);

void test_clang()
{
    int64_t a = 1000000;
    double b = a;

    sceClibPrintf("%f\n", b);
    sceClibPrintf("%lld\n", a);
}
```

I discovered that while building for PS Vita.

Build with: `clang -c .\test_clang.c -mcpu=cortex-a9 --target=armv7a-unknown-unknown -mfloat-abi=hard`
When running, b is printing 0.0.

And please, of course I've tested that with GCC, so, the problem is not printing. I've discovered that issue because of having wrong numbers.

If I did instead `double b = 1000000`, it works correctly.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to