| Issue |
161634
|
| Summary |
[InstCombine] ninf should not be preserved
|
| Labels |
miscompilation,
llvm:instcombine,
floating-point,
generated by fuzzer
|
| Assignees |
dtcxzyw
|
| Reporter |
dtcxzyw
|
Reproducer: https://alive2.llvm.org/ce/z/GNeZKU
```
; bin/opt -passes=instcombine test.ll -S
define float @select_fpclass_fadd(i1 %cond, float nofpclass(nan) %A, float %B) {
%C = fadd float %A, %B
%D = select ninf i1 %cond, float %C, float %A
ret float %D
}
```
```
=>
define float @select_fpclass_fadd(i1 %cond, float nofpclass(3) %A, float %B) {
#0:
%C = select ninf i1 %cond, float %B, float -0.000000
%D = fadd float nofpclass(3) %A, %C
ret float %D
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source
Example:
i1 %cond = #x1 (1)
float nofpclass(3) %A = #xff800000 (-oo)
float %B = #x7f800000 (+oo)
Source:
float %C = #xffc00000 (QNaN)
float %D = #xffc00000 (QNaN)
Target:
float %C = poison
float %D = poison
Source value: #xffc00000 (QNaN)
Target value: poison
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs