[llvm-commits] [patch][pr12251] Use the range metadata in computeMaskedBits and add an optimization to InstructionSimplify.
Rafael Espíndola
rafael.espindola at gmail.com
Sun Mar 25 18:48:06 PDT 2012
>> + for (unsigned i = 0; i < NumRanges; ++i) {
>> + ConstantInt *Lower = cast<ConstantInt>(Ranges.getOperand(2*i + 0));
>> + ConstantInt *Upper = cast<ConstantInt>(Ranges.getOperand(2*i + 1));
>> + ConstantRange Range(Lower->getValue(), Upper->getValue());
>> + if (Range.isWrappedSet())
>> + MinLeadingZeros = 0; // -1 has no zeros
>
>
> here you could break out of the loop.
True, but for all current uses NumRanges is 1.
>
>
> Ciao, Duncan.
Cheers,
Rafael
More information about the llvm-commits
mailing list