diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-05-22 17:08:52 +0000 | 
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-05-22 17:08:52 +0000 | 
| commit | a8ef4a57378cd0629ba4ac5ee7583c14cbb94d53 (patch) | |
| tree | c7b77d5c6366e5ba42a6917b9948804d7ad7e2fc /llvm/lib/Transforms/InstCombine | |
| parent | 7b41393497019bbfae2010ea2d41d28e0ce8766c (diff) | |
| download | bcm5719-llvm-a8ef4a57378cd0629ba4ac5ee7583c14cbb94d53.tar.gz bcm5719-llvm-a8ef4a57378cd0629ba4ac5ee7583c14cbb94d53.zip | |
reduce indent; NFC
llvm-svn: 270372
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | 38 | 
1 files changed, 19 insertions, 19 deletions
| diff --git a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index 4c3dccb533d..47430f915df 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -45,28 +45,28 @@ static Value *simplifyValueKnownNonZero(Value *V, InstCombiner &IC,    // (PowerOfTwo >>u B) --> isExact since shifting out the result would make it    // inexact.  Similarly for <<. -  if (BinaryOperator *I = dyn_cast<BinaryOperator>(V)) -    if (I->isLogicalShift() && -        isKnownToBeAPowerOfTwo(I->getOperand(0), IC.getDataLayout(), false, 0, -                               IC.getAssumptionCache(), &CxtI, -                               IC.getDominatorTree())) { -      // We know that this is an exact/nuw shift and that the input is a -      // non-zero context as well. -      if (Value *V2 = simplifyValueKnownNonZero(I->getOperand(0), IC, CxtI)) { -        I->setOperand(0, V2); -        MadeChange = true; -      } +  BinaryOperator *I = dyn_cast<BinaryOperator>(V); +  if (I && I->isLogicalShift() && +      isKnownToBeAPowerOfTwo(I->getOperand(0), IC.getDataLayout(), false, 0, +                             IC.getAssumptionCache(), &CxtI, +                             IC.getDominatorTree())) { +    // We know that this is an exact/nuw shift and that the input is a +    // non-zero context as well. +    if (Value *V2 = simplifyValueKnownNonZero(I->getOperand(0), IC, CxtI)) { +      I->setOperand(0, V2); +      MadeChange = true; +    } -      if (I->getOpcode() == Instruction::LShr && !I->isExact()) { -        I->setIsExact(); -        MadeChange = true; -      } +    if (I->getOpcode() == Instruction::LShr && !I->isExact()) { +      I->setIsExact(); +      MadeChange = true; +    } -      if (I->getOpcode() == Instruction::Shl && !I->hasNoUnsignedWrap()) { -        I->setHasNoUnsignedWrap(); -        MadeChange = true; -      } +    if (I->getOpcode() == Instruction::Shl && !I->hasNoUnsignedWrap()) { +      I->setHasNoUnsignedWrap(); +      MadeChange = true;      } +  }    // TODO: Lots more we could do here:    //    If V is a phi node, we can call this on each of its operands. | 

