[llvm-commits] [llvm] r59847 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp LegalizeDAG.cpp LegalizeIntegerTypes.cpp LegalizeTypes.h

Duncan Sands baldrick at free.fr
Fri Nov 21 20:14:38 PST 2008


Hi Bill,

> Yeah. The i1 was causing failures. I'm probably horribly abusing your  
> legalizing types code. If you have any suggestions, please send them  
> my way as I've never worked on this code before.

what do you think of the attached patch?  It simplifies the type
legalization part a bit, and produces better code by teaching
SelectionDAG about the extra bits in an i8 SADDO/UADDO node.  In
essence, I spontaneously decided that on x86 this i8 boolean result
would be either 0 or 1, and on other platforms 0/1 or 0/-1, depending
on whether the platform likes it's boolean zero extended or sign
extended.  Hopefully that's ok.  You can see the better code on the
add-with-overflow testcase.

Ciao,

Duncan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addo.diff
Type: text/x-patch
Size: 5572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081122/5a06e0a2/attachment.bin>


More information about the llvm-commits mailing list