Issue |
137998
|
Summary |
AArch64 backend folds fcmp+select to fminnm, causing confusion between +0.0 and -0.0
|
Labels |
backend:AArch64,
llvm:codegen,
miscompilation,
floating-point
|
Assignees |
|
Reporter |
regehr
|
we're lowing this:
```llvm
define float @f(float %0, float %1) {
%3 = fcmp nnan nsz ole float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
```
to:
```
_f:
fminnm s0, s0, s1
ret
```
but this appears to be incorrect for `f(0.0, -0.0)`. in the LLVM code, %3 = true, so we return 0.0. but the ARM version returns -0.0 for the same inputs.
cc @nunoplopes @arsenm @dtcxzyw
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs