| Issue |
235737
|
| Summary |
llubi accepts a NaN result from a call marked nnan
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Roticv912
|
A call marked nnan returns NaN and a subsequent comparison and conditional branch execute without reporting undefined behavior.
### Program
```llvm
define float @f() {
ret float 0x7FF8000000000000
}
define i32 @main() {
%x = call nnan float @f()
%c = fcmp uno float %x, 0.0
br i1 %c, label %end, label %end
end:
ret i32 0
}
```
### Output
```
Entering function: main
Entering function: f
ret float +qnan
Exiting function: f
%x = call nnan float @f() => float NaN
%c = fcmp uno float %x, 0.000000e+00 => T
br i1 %c, label %end, label %end jump to %end
ret i32 0
Exiting function: main
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs