[llvm-commits] [llvm] r168580 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp lib/Transforms/Utils/SimplifyLibCalls.cpp test/Transforms/InstCombine/toascii-1.ll test/Transforms/SimplifyLibCalls/ToAscii.ll
Meador Inge
meadori at codesourcery.com
Mon Nov 26 21:55:09 PST 2012
On Nov 26, 2012, at 3:19 AM, Benjamin Kramer wrote:
> On 26.11.2012, at 04:41, Meador Inge <meadori at codesourcery.com> wrote:
>
>>
>> +struct ToAsciiOpt : public LibCallOptimization {
>> + virtual Value *callOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) {
>> + FunctionType *FT = Callee->getFunctionType();
>> + // We require i32(i32)
>> + if (FT->getNumParams() != 1 || FT->getReturnType() != FT->getParamType(0) ||
>> + !FT->getParamType(0)->isIntegerTy(32))
>> + return 0;
>> +
>> + // isascii(c) -> c & 0x7f
>
> toascii?
Yup. Fixed in r168605. Thanks.
--
Meador Inge
CodeSourcery / Mentor Embedded
More information about the llvm-commits
mailing list