Issue 233677
Summary llubi returns a nonzero result for a sequential floating-point reduction that should produce zero
Labels new issue
Assignees
Reporter Roticv912
    With denormal_fpenv(ieee|positivezero), this sequential llvm.vector.reduce.fmul produces float bits 8388608 instead of the expected 0.

### Program
```
declare float @llvm.vector.reduce.fmul.v2f32(float, <2 x float>)
define i32 @main() denormal_fpenv(ieee|positivezero) {
  %f = call float @llvm.vector.reduce.fmul.v2f32(float 0x3810000000000000, <2 x float> <float 0.5, float 2.0>)
  %r = bitcast float %f to i32
  ret i32 %r
}
```

### Output
```
Entering function: main
  %f = call float @llvm.vector.reduce.fmul.v2f32(float f0x00800000, <2 x float> <float 5.000000e-01, float 2.000000e+00>) => float 0x00800000
  %r = bitcast float %f to i32 => i32 8388608
  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