Issue |
143360
|
Summary |
[RISCV] -ffast-math issue on llvm 20.1.0
|
Labels |
new issue
|
Assignees |
|
Reporter |
amitch1999
|
Hi,
Compiling this simple test, which is taken from gcc's regression, works on llvm 18.1.7, but gets a link error on llvm 20.1.0 (undefined reference to 'link_error')
Compiled using `clang test.c -O2 -ffast-math -lm`
On llvm 20 & 18, without the `-ffast-math` flag, compilation passes.
(my default march is `rv32imc`, but I tried if with a couple different march's(32/64, with/out `f`, with/out `d`) with the same result)
```
extern void link_error(void);
extern double atan(double);
int main()
{
if (atan(1.0) < 0.78 || atan(1.0) > 0.79)
link_error(); /* expected to be optimized out */
return 0;
}
```
Is this expected?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs