[PATCH] D28853: [SelectionDAG] Improve knownbits handling of UMIN/UMAX (PR31293)
    Matt Arsenault via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan 19 14:13:24 PST 2017
    
    
  
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2712-2715
+    // UMAX - we know that the result will have the maximum of the
+    // known one leading bits of the inputs.
+    unsigned LeadOne = KnownOne.countLeadingOnes();
+    LeadOne = std::max(LeadOne, KnownOne2.countLeadingOnes());
----------------
Should it also be the minimum of the known leading 0s?
Repository:
  rL LLVM
https://reviews.llvm.org/D28853
    
    
More information about the llvm-commits
mailing list