[llvm] [IndVarSimplify] Ensure fp values can be represented as consecutive integers (PR #166649)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 02:41:58 PST 2025
antoniofrighetto wrote:
> This constraint is still not enough. Consider the following case:
Thanks, good catch. While indeed integers from $[0,2^{24}]$ can be represented for single precision, $2^{24} + 1$ would get rounded to the nearest representable float, making the transformation fp -> int imprecise. Bailing out when >= limit, also refactored better the code.
https://github.com/llvm/llvm-project/pull/166649
More information about the llvm-commits
mailing list