Issue 233676
Summary llubi violates the same-sign zero rule for llvm.minimum with nsz
Labels new issue
Assignees
Reporter Roticv912
    llvm.minimum with nsz can return -0.0 for two +0.0 operands, producing the integer bit pattern -2147483648 instead of 0.

### Program
```
declare float @llvm.minimum.f32(float, float)
define i32 @main() {
  %f = call nsz float @llvm.minimum.f32(float 0.0, float 0.0)
  %r = bitcast float %f to i32
  ret i32 %r
}
```

### Output
```
Entering function: main
  %f = call nsz float @llvm.minimum.f32(float 0.000000e+00, float 0.000000e+00) => float -0.000000e+00
  %r = bitcast float %f to i32 => i32 -2147483648
  ret i32 %r
Exiting function: main
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to