[llvm-commits] [llvm] r60857 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/add-with-overflow.ll

Eli Friedman eli.friedman at gmail.com
Wed Dec 10 15:44:53 PST 2008


On Wed, Dec 10, 2008 at 2:36 PM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Wed Dec 10 16:36:00 2008
> New Revision: 60857
>
> URL: http://llvm.org/viewvc/llvm-project?rev=60857&view=rev
> Log:
> If ADD, SUB, or MUL have an overflow bit that's used, don't do transformation on
> them. The DAG combiner expects that nodes that are transformed have one value
> result.

This approach somehow seems a little scary; I'm not completely sure,
but do we really want target-independent nodes producing
platform-specific results?  I don't think any other code does this,
and it seems like it's overloading the semantics in a dangerous way.
Is there some particular reason why you preferred this over adding
instructions like X86ISD::ADD_FLAGS for an add that sets EFLAGS?

-Eli



More information about the llvm-commits mailing list