[llvm-commits] [llvm] r37851 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

David A. Greene greened at obbligato.org
Tue Jul 3 09:43:08 PDT 2007


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



More information about the llvm-commits mailing list