[llvm] r291447 - fix comment typos; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 08:27:56 PST 2017
Author: spatel
Date: Mon Jan 9 10:27:56 2017
New Revision: 291447
URL: http://llvm.org/viewvc/llvm-project?rev=291447&view=rev
Log:
fix comment typos; NFC
Modified:
llvm/trunk/include/llvm/Analysis/TargetLibraryInfo.h
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/include/llvm/Analysis/TargetLibraryInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetLibraryInfo.h?rev=291447&r1=291446&r2=291447&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetLibraryInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetLibraryInfo.h Mon Jan 9 10:27:56 2017
@@ -290,7 +290,7 @@ public:
}
/// Returns extension attribute kind to be used for i32 parameters
- /// correpsonding to C-level int or unsigned int. May be zeroext, signext,
+ /// corresponding to C-level int or unsigned int. May be zeroext, signext,
/// or none.
Attribute::AttrKind getExtAttrForI32Param(bool Signed = true) const {
if (Impl->ShouldExtI32Param)
@@ -301,7 +301,7 @@ public:
}
/// Returns extension attribute kind to be used for i32 return values
- /// correpsonding to C-level int or unsigned int. May be zeroext, signext,
+ /// corresponding to C-level int or unsigned int. May be zeroext, signext,
/// or none.
Attribute::AttrKind getExtAttrForI32Return(bool Signed = true) const {
if (Impl->ShouldExtI32Return)
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=291447&r1=291446&r2=291447&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Jan 9 10:27:56 2017
@@ -1903,7 +1903,7 @@ Instruction *InstCombiner::foldICmpShlCo
return foldICmpShlOne(Cmp, Shl, C);
// Check that the shift amount is in range. If not, don't perform undefined
- // shifts. When the shift is visited it will be simplified.
+ // shifts. When the shift is visited, it will be simplified.
unsigned TypeBits = C->getBitWidth();
if (ShiftAmt->uge(TypeBits))
return nullptr;
@@ -1923,7 +1923,7 @@ Instruction *InstCombiner::foldICmpShlCo
return new ICmpInst(Pred, X, LShrC);
if (Shl->hasOneUse()) {
- // Otherwise strength reduce the shift into an and.
+ // Otherwise, strength reduce the shift into an and.
Constant *Mask = ConstantInt::get(Shl->getType(),
APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt->getZExtValue()));
@@ -1951,7 +1951,7 @@ Instruction *InstCombiner::foldICmpShlCo
}
// When the shift is nuw and pred is >u or <=u, comparison only really happens
- // in the pre-shifted bits. Since InstSimplify canoncalizes <=u into <u, the
+ // in the pre-shifted bits. Since InstSimplify canonicalizes <=u into <u, the
// <=u case can be further converted to match <u (see below).
if (Shl->hasNoUnsignedWrap() &&
(Pred == ICmpInst::ICMP_UGT || Pred == ICmpInst::ICMP_ULT)) {
@@ -1970,9 +1970,9 @@ Instruction *InstCombiner::foldICmpShlCo
// Transform (icmp pred iM (shl iM %v, N), C)
// -> (icmp pred i(M-N) (trunc %v iM to i(M-N)), (trunc (C>>N))
// Transform the shl to a trunc if (trunc (C>>N)) has no loss and M-N.
- // This enables us to get rid of the shift in favor of a trunc which can be
+ // This enables us to get rid of the shift in favor of a trunc that may be
// free on the target. It has the additional benefit of comparing to a
- // smaller constant, which will be target friendly.
+ // smaller constant that may be more target-friendly.
unsigned Amt = ShiftAmt->getLimitedValue(TypeBits - 1);
if (Shl->hasOneUse() && Amt != 0 && C->countTrailingZeros() >= Amt &&
DL.isLegalInteger(TypeBits - Amt)) {
More information about the llvm-commits
mailing list