diff options
author | Chris Lattner <sabre@nondot.org> | 2007-11-23 22:34:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-11-23 22:34:59 +0000 |
commit | ecc0274a54658a4ee76d783b285a0690ad760928 (patch) | |
tree | b3e24895981a6ac10ca22fbd3b6ebdbe22ac9a36 /lib/Analysis | |
parent | 61ad449be85ad31c46206caedc4a914d82695ceb (diff) | |
download | external_llvm-ecc0274a54658a4ee76d783b285a0690ad760928.zip external_llvm-ecc0274a54658a4ee76d783b285a0690ad760928.tar.gz external_llvm-ecc0274a54658a4ee76d783b285a0690ad760928.tar.bz2 |
splice some lines together, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 886dd9f..494c94e 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -516,18 +516,14 @@ llvm::ConstantFoldCall(Function *F, Constant** Operands, unsigned NumOperands) { break; } } else if (ConstantInt *Op = dyn_cast<ConstantInt>(Operands[0])) { - if (Len > 11 && !memcmp(Str, "llvm.bswap", 10)) { + if (Len > 11 && !memcmp(Str, "llvm.bswap", 10)) return ConstantInt::get(Op->getValue().byteSwap()); - } else if (Len > 11 && !memcmp(Str, "llvm.ctpop", 10)) { - uint64_t ctpop = Op->getValue().countPopulation(); - return ConstantInt::get(Ty, ctpop); - } else if (Len > 10 && !memcmp(Str, "llvm.cttz", 9)) { - uint64_t cttz = Op->getValue().countTrailingZeros(); - return ConstantInt::get(Ty, cttz); - } else if (Len > 10 && !memcmp(Str, "llvm.ctlz", 9)) { - uint64_t ctlz = Op->getValue().countLeadingZeros(); - return ConstantInt::get(Ty, ctlz); - } + else if (Len > 11 && !memcmp(Str, "llvm.ctpop", 10)) + return ConstantInt::get(Ty, Op->getValue().countPopulation()); + else if (Len > 10 && !memcmp(Str, "llvm.cttz", 9)) + return ConstantInt::get(Ty, Op->getValue().countTrailingZeros()); + else if (Len > 10 && !memcmp(Str, "llvm.ctlz", 9)) + return ConstantInt::get(Ty, Op->getValue().countLeadingZeros()); } } else if (NumOperands == 2) { if (ConstantFP *Op1 = dyn_cast<ConstantFP>(Operands[0])) { |