[llvm-commits] [llvm] r69574 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Dan Gohman gohman at apple.com
Thu Apr 23 19:10:40 PDT 2009


This looks good to me. It may not even be needed to limit indices to
16, 32, and 64; offhand it would seem that any integer type should
work. But, that's only of theoretical interest until someone actually
needs it.

On Apr 23, 2009, at 9:34 AM, Sanjiv Gupta wrote:
>
> Index: lib/VMCore/Type.cpp
> ===================================================================
> --- lib/VMCore/Type.cpp	(revision 69882)
> +++ lib/VMCore/Type.cpp	(working copy)
> @@ -1411,7 +1411,8 @@
>
> bool SequentialType::indexValid(const Value *V) const {
>   if (const IntegerType *IT = dyn_cast<IntegerType>(V->getType()))
> -    return IT->getBitWidth() == 32 || IT->getBitWidth() == 64;
> +    return IT->getBitWidth() == 16 || IT->getBitWidth() == 32
> +           || IT->getBitWidth() == 64;

LLVM style has the || on the first line, not the second.

Thanks,

Dan




More information about the llvm-commits mailing list