On Tuesday 03 July 2007 11:23, Chris Lattner wrote:

> >> +  // fold (or x, undef) -> -1
> >> +  if (N1.getOpcode() == ISD::UNDEF)
> >> +    return DAG.getConstant(-1, VT);
> >
> > Is this the right way to get an all-bits-one value?
>
> Yes, but this has the same problem with vectors. :)

I don't understand the comment about vectors, but I would have expected
"all ones" to be spelled "~0ull."  Of course, the suffix used might depend on
the host architecture, which makes things tricky.  But not every host may be
two's-complement, either.  :)

                                                       -Dave
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to