[PATCH] D125774: [InstCombine] fold float trunc into exact itofp for small constants

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 13:55:10 PDT 2022


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:1757-1758
 
+  // If all the value is within the value range of 2^DestNumSigBits, then the
+  // value can be accurately represented.
+  KnownBits SrcKnown = llvm::computeKnownBits(Src, IC.getDataLayout());
----------------
This part is mentioned in the TODO right under here (update that...) and independent of any control-flow changes, so you could remove the changes to ValueTracking and just focus on this part.


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

https://reviews.llvm.org/D125774



More information about the llvm-commits mailing list