Kill unneeded SExt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104692 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-05-26 09:45:04 +00:00
parent c2798a18a7
commit 1464c1d60a

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)