[LLVMdev] ARM TargetLowering broken?

james woodyatt jhwoodyatt at mac.com
Tue May 6 09:46:12 PDT 2008


everyone--

My build of LLVM-GCC from top-of-trunk sources is failing with the  
assertion in ARMISelTargetLowering at line 667, in LowerRET, where it  
says "Do not know how to return this many arguments!"  This happens  
when the cross-compiler attempts to build _muldc3 for libgcc2.

The more I have investigated this problem, them more convinced I have  
become that this isn't a stupid newbie bug, but something more  
troubling in the integration of ARM code generation with LLVM-GCC.

For reasons I haven't been able to understand yet, there are nine  
operands to the ISD::RET node when this happens, which has me a little  
confused because _muldc3 is not really a very complex function (please  
pardon the pun).  It has one return point, where it returns a CTYPE  
value, which I'm expecting is a represented internally as a pair of  
floating point numbers.

What's the more likely explanation for the error I'm seeing?

+ The ARM TargetLowering code for ISD::RET is busted for GCC's complex  
number types.

+ The LLVM backed in GCC is busted for complex types.

I don't know, but I suspect the former.  I'm still grinding on this  
problem in my copious spare time, and I'll be grateful for any tips  
from LLVM experts that come my way.  My next step: try to coax my LLVM- 
GCC variant to emit the LLVM IR for what it's doing when it compiles  
_muldc3 in libgcc2.

If you've read this far, then thank you for your attention.


-- 
j h woodyatt <jhw at conjury.org>





More information about the llvm-dev mailing list