[LLVMdev] Problems expanding fcmp to a libcall

Duncan Sands baldrick at free.fr
Wed Jun 25 06:32:08 PDT 2008


> At the moment I'm not doing any custom lowering in my target - the 
> lowering I was describing was what I observed the SectionDAG was doing. 
> I was under the impression that LLVM's soft float support meant that if 
> I didn't call addRegisterClass() with any FP types then floating point 
> operations would be expanded into libcalls and it would all just 
> work(tm). And for the most part it does work - addition, division, etc 
> on floating point types are all lower correctly by the SelectionDAG 
> without any further intervention.
> However it fails fcmp. I was wanting to understand if this was expected 
> and if so what I should do about it. It sounds like I need to custom 
> lower the nodes directly. I would certainly be nice if this wasn't 
> necessary.
> I tried the same code with the MIPS target and it also fails in the same 
> manner - a ISD::CALL node remains in the DAG after legalization and the 
> instruction selection fails.

you may want to try the new LegalizeTypes infrastructure once it is finished
(hopefully in a week or two).



More information about the llvm-dev mailing list