summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-12-17 23:27:41 +0000
committerBill Wendling <isanbard@gmail.com>2010-12-17 23:27:41 +0000
commit5e3605552edf03cf29b2b97df2762b037637b83f (patch)
tree8a72996ca76377558a97c0c75909ce9d65c04133 /llvm/lib/Transforms
parentcf846100d8c1ef3f3a6b914656e480ad9776bfe5 (diff)
downloadbcm5719-llvm-5e3605552edf03cf29b2b97df2762b037637b83f.tar.gz
bcm5719-llvm-5e3605552edf03cf29b2b97df2762b037637b83f.zip
Whitespace fixes. No functionality change.
llvm-svn: 122110
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
index df2abb5cef2..88ee1453faf 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -1019,25 +1019,25 @@ Instruction *InstCombiner::visitSExt(SExtInst &CI) {
}
}
}
-
- // vector (x <s 0) ? -1 : 0 -> ashr x, 31 -> all ones if signed
+
+ // vector (x <s 0) ? -1 : 0 -> ashr x, 31 -> all ones if signed.
if (const VectorType *VTy = dyn_cast<VectorType>(DestTy)) {
- ICmpInst::Predicate Pred; Value *CmpLHS;
- if (match(Src, m_ICmp(Pred, m_Value(CmpLHS), m_Zero()))) {
- if (Pred == ICmpInst::ICMP_SLT && CmpLHS->getType() == DestTy) {
- const Type *EltTy = VTy->getElementType();
-
- // splat the shift constant to a cosntant vector
- Constant *Sh = ConstantInt::get(EltTy, EltTy->getScalarSizeInBits()-1);
- std::vector<Constant *> Elts(VTy->getNumElements(), Sh);
- Constant *VSh = ConstantVector::get(Elts);
-
- Value *In = Builder->CreateAShr(CmpLHS, VSh, CmpLHS->getName()+".lobit");
- return ReplaceInstUsesWith(CI, In);
+ ICmpInst::Predicate Pred; Value *CmpLHS;
+ if (match(Src, m_ICmp(Pred, m_Value(CmpLHS), m_Zero()))) {
+ if (Pred == ICmpInst::ICMP_SLT && CmpLHS->getType() == DestTy) {
+ const Type *EltTy = VTy->getElementType();
+
+ // splat the shift constant to a cosntant vector
+ Constant *Sh = ConstantInt::get(EltTy, EltTy->getScalarSizeInBits()-1);
+ std::vector<Constant *> Elts(VTy->getNumElements(), Sh);
+ Constant *VSh = ConstantVector::get(Elts);
+
+ Value *In = Builder->CreateAShr(CmpLHS, VSh,CmpLHS->getName()+".lobit");
+ return ReplaceInstUsesWith(CI, In);
+ }
}
}
- }
-
+
// If the input is a shl/ashr pair of a same constant, then this is a sign
// extension from a smaller value. If we could trust arbitrary bitwidth
// integers, we could turn this into a truncate to the smaller bit and then
OpenPOWER on IntegriCloud