[PATCH] D129358: [IndVars] Eliminate redundant type cast between unsigned integer and float
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 06:25:01 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:694
+ CastInst::CastOps Opcode = CI->getOpcode();
+ if (Opcode != CastInst::FPToSI && Opcode != CastInst::FPToUI)
+ continue;
----------------
For fptoui, shouldn't we also check that it's non-negative? Wouldn't your current code optimize an IV that does `-100` to `100` for example?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129358/new/
https://reviews.llvm.org/D129358
More information about the llvm-commits
mailing list