| Issue |
161525
|
| Summary |
[InstCombine] `ninf` should not be propagated when folding `fcmp pred, x - y, 0` to `fcmp pred, x, y`
|
| Labels |
miscompilation,
llvm:instcombine,
floating-point,
generated by fuzzer
|
| Assignees |
dtcxzyw
|
| Reporter |
dtcxzyw
|
Reproducer: https://alive2.llvm.org/ce/z/ZHW6-B
```
; bin/opt -passes=instcombine test.ll -S
define i1 @src1(float %x, float %y) {
%fs = fsub float %x, %y
%cmp = fcmp ninf ule float %fs, 0.000000e+00
ret i1 %cmp
}
```
```
=>
define i1 @src1(float %x, float %y) {
#0:
%cmp = fcmp ninf ule float %x, %y
ret i1 %cmp
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source
Example:
float %x = #x7f800000 (+oo)
float %y = #x7f800080 (SNaN)
Source:
float %fs = #xffc00003 (QNaN)
i1 %cmp = #x1 (1)
Target:
i1 %cmp = poison
Source value: #x1 (1)
Target value: poison
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs