[LLVMdev] Use of custom operations after DAG legalization

David Chisnall David.Chisnall at cl.cam.ac.uk
Fri Sep 26 08:44:06 PDT 2014


On 26 Sep 2014, at 11:34, Steve Montgomery <stephen.montgomery3 at btinternet.com> wrote:

> This got me wondering why it's ever permitted for the DAG Combiner, when running post-legalization, to combine to an operation that requires custom lowering. I'd believed that after legalization, all operations were Legal and that none were permitted to be Custom. I see several places in DAGCombine where nodes are combined, post-legalization, to Legal or Custom operations but I can also see other places where only Legal operations are permitted. Is this intentional?

I've hit numerous similar issues with SelectionDAG.  They're all difficult to debug because the typical behaviour is an infinite loop, where the back end replaces something generic with something that works for the architecture and then SelectionDAG decides to replace this with the original generic thing.  One example is that our architecture supported unaligned loads and stores with some pointer types, but not others.

David





More information about the llvm-dev mailing list