[PATCH] D129191: [IndVars] Eliminate redundant type cast between integer and float

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 00:16:22 PDT 2022


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM

A natural followup here would be to do the same for the unsigned case.



================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:687
+  if (IVRange.getActiveBits() <= DestNumSigBits) {
+
+    for (User *U : UseInst->users()) {
----------------
nit: Unnecessary empty line


================
Comment at: llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:930
 
+    // Try to use integer induction for FPToSI of float induction Directly.
+    if (replaceFloatIVWithIntegerIV(UseInst))
----------------
Directly -> directly


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

https://reviews.llvm.org/D129191



More information about the llvm-commits mailing list