efriedma added a comment.

> According to our definition, v4si is NOT a "Vector" type, since a vector type 
> requires it be a FP value.

Umm, what?  An integer vector is still a vector.  The backend will return it in 
xmm0 on x86 (both 32 and 64-bit).

The actual problem here is that 
X86_32TargetCodeGenInfo::addReturnRegisterOutputs is adding outputs which don't 
make any sense; 32-bit x86 only returns integers and pointers (and maybe a few 
other weird things like complex integers and tiny vectors?) in EAX:EDX.   So we 
shouldn't add a constraint which involves those registers if the function 
returns a 128-bit vector (which goes in xmm0), or a struct (which is returned 
in memory), or a float (which is returned in an x87 register), etc.

Adding the "right" constraint for stuff that isn't returned in EAX would be 
nice, but probably isn't necessary unless we actually run into code which 
depends on it.


Repository:
  rL LLVM

https://reviews.llvm.org/D37448



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to