[llvm-commits] [llvm] r60014 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Bill Wendling
isanbard at gmail.com
Tue Nov 25 02:07:02 PST 2008
Yeah. I was going to optimize it later. But got a bit lazy.
-bw
On Nov 25, 2008, at 1:00 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Bill,
>
>> + SDValue LHSPos = DAG.getSetCC(OType, LHS, Zero, ISD::SETGE);
>> + SDValue RHSPos = DAG.getSetCC(OType, RHS, Zero, ISD::SETGE);
>> + SDValue And1 = DAG.getNode(ISD::AND, OType, LHSPos, RHSPos);
>
> can't you just do: overflowed = (LHSPos == RHSPos) && (LHSPos !=
> SumPos)?
> (Positive means >= 0).
>
> Ciao,
>
> Duncan.
More information about the llvm-commits
mailing list