OSDN Git Service

clean-up; NFC
authorSanjay Patel <spatel@rotateright.com>
Sat, 4 Jun 2016 21:20:44 +0000 (21:20 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 4 Jun 2016 21:20:44 +0000 (21:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271807 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCompares.cpp

index 3145174..0f119bf 100644 (file)
@@ -2439,15 +2439,14 @@ Instruction *InstCombiner::visitICmpInstWithCastAndCast(ICmpInst &ICI) {
   }
 
   // If we aren't dealing with a constant on the RHS, exit early.
-  ConstantInt *CI = dyn_cast<ConstantInt>(ICI.getOperand(1));
+  auto *CI = dyn_cast<ConstantInt>(ICI.getOperand(1));
   if (!CI)
     return nullptr;
 
   // Compute the constant that would happen if we truncated to SrcTy then
-  // reextended to DestTy.
+  // re-extended to DestTy.
   Constant *Res1 = ConstantExpr::getTrunc(CI, SrcTy);
-  Constant *Res2 = ConstantExpr::getCast(LHSCI->getOpcode(),
-                                                Res1, DestTy);
+  Constant *Res2 = ConstantExpr::getCast(LHSCI->getOpcode(), Res1, DestTy);
 
   // If the re-extended constant didn't change...
   if (Res2 == CI) {