[LLVMdev] Bug in SelectionDAGBuild.cpp?

Villmow, Micah Micah.Villmow at amd.com
Wed Feb 11 12:54:27 PST 2009


I'm hitting a problem in SelectionDAGBuild::visitRet(), mainly:

MVT VT = ValueVTs[j];

// FIXME: C calling convention requires the return type to be promoted
to

      // at least 32-bit. But this is not necessary for non-C calling

      // conventions.

      if (VT.isInteger()) {

        MVT MinVT = TLI.getRegisterType(MVT::i32);

        if (VT.bitsLT(MinVT))

          VT = MinVT;

      }

 

This is occurring when VT is a 16bit vector type,<2x i8>. LLVM is then
changing it to be a 32bit type and

it asserts in :

getCopyToParts(DAG, SDValue(RetOp.getNode(), RetOp.getResNo() + j),

                     &Parts[0], NumParts, PartVT, ExtendKind);

 

Here:

assert(ValueVT.getVectorElementType() == PartVT &&

               ValueVT.getVectorNumElements() == 1 &&

               "Only trivial vector-to-scalar conversions should get
here!");

 

Because it switched PartVT from a vector type<2xi8> into a scalar
integer<i32>.

 

Any idea's on how I can get around this constraint?

Thanks,

Micah Villmow

Systems Engineer

Advanced Technology & Performance

Advanced Micro Devices Inc.

S1-609 One AMD Place

Sunnyvale, CA. 94085

P: 408-749-3966

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090211/7debfe80/attachment.html>


More information about the llvm-dev mailing list