[LLVMdev] Shouldn't DAGCombine insert legal nodes?
Scott Michel
scottm at aero.org
Tue Jan 20 08:53:13 PST 2009
Duncan:
DAGCombine is inserting an IllegalOperation after target-specific
instruction legalization has occurred. I'm inserting the fabs and the
bitconvert during instruction legalization; DAGCombine is converting
the fabs/bitconvert to an 'and' on its second (third?) pass.
-scooter
On Jan 20, 2009, at 12:24 AM, Duncan Sands wrote:
> On Tuesday 20 January 2009 07:52:37 Evan Cheng wrote:
>> Right. DAGCombine will insert *illegal* nodes before legalize.
>
> There are two stages of legalization: legalization of types,
> followed by legalization of operations. Before type legalization
> DAGCombine is allowed to create nodes with illegal types and illegal
> operations. After type legalization but before operation legalization
> it is allowed to create nodes with illegal operations, but all types
> must be legal. After operation legalization it is only allowed to
> create fully legal nodes.
>
> Inside DAGCombine this is specified by two flags:
> LegalTypes being true means that all nodes must have legal types.
> LegalOperations being true means that all nodes must have legal
> operations (as well as types: LegalTypes will also be true).
>
> So if LegalTypes is true and nonetheless a constant with an
> illegal type is being created then that is a DAG combiner bug.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list