[llvm] r271807 - clean-up; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 14:20:45 PDT 2016
Author: spatel
Date: Sat Jun 4 16:20:44 2016
New Revision: 271807
URL: http://llvm.org/viewvc/llvm-project?rev=271807&view=rev
Log:
clean-up; NFC
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=271807&r1=271806&r2=271807&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Sat Jun 4 16:20:44 2016
@@ -2439,15 +2439,14 @@ Instruction *InstCombiner::visitICmpInst
}
// 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) {
More information about the llvm-commits
mailing list