[PATCH] D129756: [IndVars] Directly use unsigned integer induction for FPToUI/FPToSI of float induction

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 05:19:56 PDT 2022


nikic added a comment.

I think this is correct as written, but also confusing. It would make more sense to me if for fptoui we used getUnsignedRange() and getActiveBits() and for fptosi used getSignedRange() and getMinSignedBits().



================
Comment at: llvm/test/Transforms/IndVarSimplify/floating-point-small-iv.ll:184
+; https://godbolt.org/z/51MrqYjEf
+define void @uitofp_fptoui_range () {
+; CHECK-LABEL: @uitofp_fptoui_range(
----------------
We should be testing negative ranges as well -- in this case, they would actually be not legal.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129756/new/

https://reviews.llvm.org/D129756



More information about the llvm-commits mailing list