aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShuxin Yang <shuxin.llvm@gmail.com>2013-01-07 22:41:28 +0000
committerShuxin Yang <shuxin.llvm@gmail.com>2013-01-07 22:41:28 +0000
commitf279731b7629ff1add3dbc91a8a63720c9064230 (patch)
tree7c0aa1022f5afbc6accd365e61ddf7233b81d40e /lib
parente7285c72793b69f005b5656be9f7aed101cdee4a (diff)
Cosmetical changne in order to conform to coding std.
Thank Eric Christopher for figuring out these problems! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/InstCombine/InstCombineMulDivRem.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
index 759b32b3f4..d0f43928c3 100644
--- a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+++ b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
@@ -297,9 +297,8 @@ static void detectLog2OfHalf(Value *&Op, Value *&Y, IntrinsicInst *&Log2) {
static bool isFMulOrFDivWithConstant(Value *V) {
Instruction *I = dyn_cast<Instruction>(V);
if (!I || (I->getOpcode() != Instruction::FMul &&
- I->getOpcode() != Instruction::FDiv)) {
+ I->getOpcode() != Instruction::FDiv))
return false;
- }
ConstantFP *C0 = dyn_cast<ConstantFP>(I->getOperand(0));
ConstantFP *C1 = dyn_cast<ConstantFP>(I->getOperand(1));
@@ -323,8 +322,8 @@ static bool isNormalFp(const ConstantFP *C) {
/// resulting expression. Note that this function could return NULL in
/// case the constants cannot be folded into a normal floating-point.
///
-Value *InstCombiner::foldFMulConst
- (Instruction *FMulOrDiv, ConstantFP *C, Instruction *InsertBefore) {
+Value *InstCombiner::foldFMulConst(Instruction *FMulOrDiv, ConstantFP *C,
+ Instruction *InsertBefore) {
assert(isFMulOrFDivWithConstant(FMulOrDiv) && "V is invalid");
Value *Opnd0 = FMulOrDiv->getOperand(0);
@@ -412,7 +411,9 @@ Instruction *InstCombiner::visitFMul(BinaryOperator &I) {
ConstantFP *C1 = dyn_cast<ConstantFP>(Opnd1);
bool Swap = false;
if (C0) {
- std::swap(C0, C1); std::swap(Opnd0, Opnd1); Swap = true;
+ std::swap(C0, C1);
+ std::swap(Opnd0, Opnd1);
+ Swap = true;
}
if (C1 && C1->getValueAPF().isNormal() &&