[llvm-commits] [llvm] r171805 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Shuxin Yang shuxin.llvm at gmail.com
Mon Jan 7 14:41:28 PST 2013


Author: shuxin_yang
Date: Mon Jan  7 16:41:28 2013
New Revision: 171805

URL: http://llvm.org/viewvc/llvm-project?rev=171805&view=rev
Log:
Cosmetical changne in order to conform to coding std.

Thank Eric Christopher for figuring out these problems!

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

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp?rev=171805&r1=171804&r2=171805&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp Mon Jan  7 16:41:28 2013
@@ -297,9 +297,8 @@
 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 @@
 /// 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 @@
         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() &&





More information about the llvm-commits mailing list