[llvm] ValueTracking: llvm.amdgcn.fract cannot introduce overflow (PR #189002)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 10:56:11 PDT 2026
================
@@ -63,4 +63,30 @@ define double @ret_fract_no_nan_no_inf(double nofpclass(inf nan) %x) {
ret double %fract
}
+; Fract must be <= 1, so this cannot introduce overfloww
----------------
dtcxzyw wrote:
```suggestion
; Fract must be < 1, so this cannot introduce overflow
```
See https://github.com/llvm/llvm-project/blob/e55c85341d9f757021b4f31b910d2ad2175f7e6c/llvm/lib/Analysis/ConstantFolding.cpp#L2553-L2564
https://github.com/llvm/llvm-project/pull/189002
More information about the llvm-commits
mailing list