[LLVMdev] Shouldn't DAGCombine insert legal nodes?

Evan Cheng
Tue, 20 Jan 2009 06:52:37 -0000

Right. DAGCombine will insert *illegal* nodes before legalize.

Evan

On Jan 19, 2009, at 8:17 PM, Eli Friedman wrote:

> On Mon, Jan 19, 2009 at 6:36 PM, Scott Michel <scottm at aero.org>
wrote:
>> I just ran across something interesting: DAGCombine inserts a 64-bit
>> constant as the result of converting a (bitconvert (fabs val)) to a
>> (and (bitconvert val), i64const).
>>
>> The problem: i64 constants have to be legalized for the CellSPU
>> platform. DAGCombine is doing the right thing but it's not doing
the
>> right thing for CellSPU and it's damed difficult to work around
this
>> "feature". Moreover, the way all of SelectionDAGLegalize and
>> DAGCombne's code is written, it's particularly difficult to
"re-
>> legalize" nodes unless one more legalization pass is invoked after
>> DAGCombine.
>
> I don't think DAGCombine should be doing a transform like that
> post-legalize; if it is, it's probably a bug.
>
> -Eli
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev