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

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 18:33:39 PDT 2022


Allen 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());
----------------
nikic wrote:
> Allen wrote:
> > spatel wrote:
> > > 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.
> > Apply your comment, thanks @spatel 
> It doesn't look like this comment was applied: You need to create a separate patch that includes only this change, without any changes to ValueTracking.
sorry, misssd mention https://reviews.llvm.org/D127854


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

https://reviews.llvm.org/D125774



More information about the llvm-commits mailing list