[PATCH] D129191: [IndVars] Eliminate redundant type cast between integer and float
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 03:11:00 PDT 2022
Allen added a comment.
In D129191#3638113 <https://reviews.llvm.org/D129191#3638113>, @Allen wrote:
> In D129191#3637968 <https://reviews.llvm.org/D129191#3637968>, @nikic wrote:
>
>> LGTM
>>
>> A natural followup here would be to do the same for the unsigned case.
>
> Ok, I'll try to address this , thanks for reminding. Address the unsigned case here https://reviews.llvm.org/D129358
================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:687
+ if (IVRange.getActiveBits() <= DestNumSigBits) {
+
+ for (User *U : UseInst->users()) {
----------------
nikic wrote:
> nit: Unnecessary empty line
Done
================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:930
+ // Try to use integer induction for FPToSI of float induction Directly.
+ if (replaceFloatIVWithIntegerIV(UseInst))
----------------
nikic wrote:
> Directly -> directly
Done
================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:932
+ if (replaceFloatIVWithIntegerIV(UseInst))
+ continue;
+
----------------
nikic wrote:
> You might want to call `pushIVUsers(IVOperand, L, Simplified, SimpleIVUsers);` here, to queue the potentially new direct uses of IVOperand (which no longer go through the cast pair and might be simplified now).
Done , thanks very much
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129191/new/
https://reviews.llvm.org/D129191
More information about the llvm-commits
mailing list