On Tue, Jan 20, 2009 at 12:24 AM, Duncan Sands <baldrick at free.fr> wrote:> So if LegalTypes is true and nonetheless a constant with an > illegal type is being created then that is a DAG combiner bug.The issue here isn't that i64 is illegal, it's that constants of type i64 are illegal. I'm tempted to say that having legal constants should be a requirement for marking an integer type legal... -Eli
Eli: Legal constants would be all well and good for most platforms. I don't think that CellSPU is alone in its support for i64 constants (in fact, the comment in DAGCombine says that the 64-bit constant is inserted to "avoid a constant pool spill"). In many respects, DAGCombine and operation Legalize are co-routines, not separate passes. -scooter On Jan 20, 2009, at 1:23 AM, Eli Friedman wrote:> On Tue, Jan 20, 2009 at 12:24 AM, Duncan Sands <baldrick at free.fr> > wrote: >> So if LegalTypes is true and nonetheless a constant with an >> illegal type is being created then that is a DAG combiner bug. > > The issue here isn't that i64 is illegal, it's that constants of type > i64 are illegal. I'm tempted to say that having legal constants > should be a requirement for marking an integer type legal... > > -Eli > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Jan 20, 2009, at 12:32 PM, Scott Michel wrote:> Eli: > > Legal constants would be all well and good for most platforms. I > don't think that CellSPU is alone in its support for i64 constants > (in fact, the comment in DAGCombine says that the 64-bit constant is > inserted to "avoid a constant pool spill"). > > In many respects, DAGCombine and operation Legalize are co-routines, > not separate passes.i32 immediates are not materializable in a single instruction on PowerPC or ARM. They claims that they are legal and then matches them with the appropriate expansion. Can you do a similar thing on Cell? In any case, the bug fix is probably really simple: the dag combine xform for fabs probably just needs to check to see if ISD::CONSTANT is legal if post-legalize -chris