[llvm-commits] [llvm-gcc-4.2] r53131 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Chris Lattner clattner at apple.com
Thu Jul 3 20:00:01 PDT 2008


On Jul 3, 2008, at 5:46 PM, Devang Patel wrote:
>
> URL: http://llvm.org/viewvc/llvm-project?rev=53131&view=rev
> Log:
> Expand BUILT_IN_OBJECT_SIZE.

Hey Devang,

> +    if (tree_low_cst (ObjSizeTree, 0) < 2)
> +      Result = ConstantInt::get(Type::Int32Ty, 0);
> +    else
> +      Result = ConstantInt::getAllOnesValue(Type::Int32Ty);
> +    return true;
> +  }

Isn't this backwards?  GCC has:

   object_size_type = tree_low_cst (ost, 0);
   return object_size_type < 2 ? constm1_rtx : const0_rtx;

-Chris



More information about the llvm-commits mailing list