[llvm] r274238 - fix formatting, add TODO; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 08:32:46 PDT 2016


Author: spatel
Date: Thu Jun 30 10:32:45 2016
New Revision: 274238

URL: http://llvm.org/viewvc/llvm-project?rev=274238&view=rev
Log:
fix formatting, add TODO; NFC

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=274238&r1=274237&r2=274238&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Thu Jun 30 10:32:45 2016
@@ -2176,6 +2176,7 @@ Instruction *InstCombiner::visitSwitchIn
   unsigned LeadingKnownOnes = KnownOne.countLeadingOnes();
 
   // Compute the number of leading bits we can ignore.
+  // TODO: A better way to determine this would use ComputeNumSignBits().
   for (auto &C : SI.cases()) {
     LeadingKnownZeros = std::min(
         LeadingKnownZeros, C.getCaseValue()->getValue().countLeadingZeros());
@@ -2189,7 +2190,7 @@ Instruction *InstCombiner::visitSwitchIn
   // This may produce a non-standard type for the switch, but that's ok because
   // the backend should extend back to a legal type for the target.
   bool TruncCond = false;
- if (NewWidth > 0 && NewWidth < BitWidth) {
+  if (NewWidth > 0 && NewWidth < BitWidth) {
     TruncCond = true;
     IntegerType *Ty = IntegerType::get(SI.getContext(), NewWidth);
     Builder->SetInsertPoint(&SI);




More information about the llvm-commits mailing list