| Issue |
208192
|
| Summary |
[ValueTracking] Off-by-one in frexp exponent range inferred from dominating bounds
|
| Labels |
miscompilation
|
| Assignees |
|
| Reporter |
cardigan1008
|
https://github.com/llvm/llvm-project/pull/206927 introduces a miscompilation: https://alive2.llvm.org/ce/z/jpkAUn
The patch infers `frexp`'s exponent upper bound as `ilogb(K)` from `fabs(x) <= K`, but for `K = 1.0`, the valid boundary input `x = 1.0` has `frexp` exponent 1 rather than 0, causing InstCombine to incorrectly fold `e <= 0` to true.
For more details, please refer to https://archer.top/pr/206927
cc @arsenm
> Found with [Archer](https://github.com/cuhk-s3/Archer). Please let me know if anything is wrong.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs