[llvm] r357861 - [DAG] Pull out ComputeNumSignBits call to make debugging easier. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 7 04:49:34 PDT 2019


Author: rksimon
Date: Sun Apr  7 04:49:33 2019
New Revision: 357861

URL: http://llvm.org/viewvc/llvm-project?rev=357861&view=rev
Log:
[DAG] Pull out ComputeNumSignBits call to make debugging easier. NFCI.

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

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=357861&r1=357860&r2=357861&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Apr  7 04:49:33 2019
@@ -1130,8 +1130,8 @@ bool TargetLowering::SimplifyDemandedBit
 
     // If we only care about the highest bit, don't bother shifting right.
     if (DemandedBits.isSignMask()) {
-      bool AlreadySignExtended =
-          TLO.DAG.ComputeNumSignBits(Op0) >= BitWidth - ExVTBits + 1;
+      unsigned NumSignBits = TLO.DAG.ComputeNumSignBits(Op0);
+      bool AlreadySignExtended = NumSignBits >= BitWidth - ExVTBits + 1;
       // However if the input is already sign extended we expect the sign
       // extension to be dropped altogether later and do not simplify.
       if (!AlreadySignExtended) {




More information about the llvm-commits mailing list