[llvm] r285398 - [SelectionDAG] Tidyup UDIV computeKnownBits implementation

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 06:42:24 PDT 2016


Author: rksimon
Date: Fri Oct 28 08:42:23 2016
New Revision: 285398

URL: http://llvm.org/viewvc/llvm-project?rev=285398&view=rev
Log:
[SelectionDAG] Tidyup UDIV computeKnownBits implementation

No need to clear KnownOne2/KnownZero2 bits as the next call to computeKnownBits will overwrite them anyway

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=285398&r1=285397&r2=285398&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Oct 28 08:42:23 2016
@@ -2102,8 +2102,6 @@ void SelectionDAG::computeKnownBits(SDVa
     computeKnownBits(Op.getOperand(0), KnownZero2, KnownOne2, Depth+1);
     unsigned LeadZ = KnownZero2.countLeadingOnes();
 
-    KnownOne2.clearAllBits();
-    KnownZero2.clearAllBits();
     computeKnownBits(Op.getOperand(1), KnownZero2, KnownOne2, Depth+1);
     unsigned RHSUnknownLeadingOnes = KnownOne2.countLeadingZeros();
     if (RHSUnknownLeadingOnes != BitWidth)




More information about the llvm-commits mailing list