[PATCH] D43349: [InstCombine] Make SimplifyDemandedUseBits handle PhiNode
    Eli Friedman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar 12 12:12:44 PDT 2018
    
    
  
efriedma added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:679
+      KnownBits PhiOperandKnown(BitWidth);
+      SimplifyDemandedBits(I, i, DemandedMask, PhiOperandKnown, Depth + 1);
+      IKnownZero &= PhiOperandKnown.Zero;
----------------
This call is going to be expensive in the case where the PHI node refers to itself (either directly or indirectly).  It's not an infinite loop due to the depth limit, but we might want to limit the recursion some other way.
https://reviews.llvm.org/D43349
    
    
More information about the llvm-commits
mailing list