Kill unneeded SExt.

llvm-svn: 104692
This commit is contained in:
Benjamin Kramer 2010-05-26 09:45:04 +00:00
parent 730a977e02
commit 6877119ef3
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ struct MemCmpOpt : public LibCallOptimization {
CI->getType(), "lhsv");
Value *RHSV = B.CreateZExt(B.CreateLoad(CastToCStr(RHS, B), "rhsc"),
CI->getType(), "rhsv");
return B.CreateSExt(B.CreateSub(LHSV, RHSV, "chardiff"), CI->getType());
return B.CreateSub(LHSV, RHSV, "chardiff");
}
// Constant folding: memcmp(x, y, l) -> cnst (all arguments are constant)