[PATCH] D129140: [IndVars] Directly use integer induction for FPToSI of float induction.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 05:26:11 PDT 2022
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:399
+ for (Use &U : make_early_inc_range(PN->uses())) {
+ if (isa<FPToSIInst>(U.getUser())) {
+ U.getUser()->replaceAllUsesWith(NewPHI);
----------------
nikic wrote:
> What guarantees that this is an fptosi to the correct type (i32 here)?
Ah right, `fptosi` can narrow or widen the result type. Should be fixed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129140/new/
https://reviews.llvm.org/D129140
More information about the llvm-commits
mailing list