[llvm-commits] [llvm] r59760 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Evan Cheng echeng at apple.com
Fri Nov 21 01:12:35 PST 2008


On Nov 20, 2008, at 5:41 PM, Chris Lattner wrote:

>>
>
> They aren't the same.  ADDC returns a value + flag.  SADDO returns a
> value + bool.  The use of the bool may very well be a store to memory
> or something like that.  You can't flag these together.
>
> OTOH, I think it would be perfectly fine for X86 to custom legalize
> SADDO into ADDC + an X86ISD::SETO node or something.

I wonder if it shouldn't be the other way around. Right now legalizer  
is issues ADDC + ADDE pair and these are flagged together. Why not  
issue SADDO + ADDE (which would take a boolean operand) instead? I  
rather like modeling the carry bit explicitly.

Evan

>
>
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list