[llvm-commits] [llvm] r47696 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Dale Johannesen
dalej at apple.com
Thu Feb 28 10:33:11 PST 2008
On Feb 27, 2008, at 11:06 PM, Duncan Sands wrote:
> Hi Dale,
>
>> - if (VT==MVT::f64)
>> + if (VT == MVT::v8i16 || VT == MVT::v4i32 ||
>> + VT == MVT::v2i64 || VT == MVT::v2f64 ||
>> + VT == MVT::v4f32 || VT == MVT::v16i8 ||
>> + VT == MVT::ppcf128)
>> + intVT = MVT::i128;
>> + else if (VT==MVT::f64 ||
>> + VT == MVT::v8i8 || VT == MVT::v4i16 ||
>> + VT == MVT::v2i32 || VT == MVT::v1i64 ||
>> + VT == MVT::v2f32)
>> intVT = MVT::i64;
>> else if (VT==MVT::f32)
>> intVT = MVT::i32;
>> else
>> - assert(0 && "Unaligned load of unsupported floating point
>> type");
>> + assert(0 && "Unaligned load of unsupported type");
>
> how about replacing all that with:
> IntVT = MVT::getIntegerType(MVT::getSizeInBits(VT));
I don't believe the algorithm works for the 80 and 96 bit basic types.
"Unaligned load of unsupported type" seems like a good answer for them.
> You might want to check that the integer type is not an extended
> value type.
>
>> - if (LoadedVT == MVT::f64)
>> + if (LoadedVT == MVT::v8i16 || LoadedVT == MVT::v4i32 ||
>> + LoadedVT == MVT::v2i64 || LoadedVT == MVT::v2f64 ||
>> + LoadedVT == MVT::v4f32 || LoadedVT == MVT::v16i8 ||
>> + LoadedVT == MVT::ppcf128)
>> + intVT = MVT::i128;
>> + else if (LoadedVT == MVT::f64 ||
>> + LoadedVT == MVT::v8i8 || LoadedVT == MVT::v4i16 ||
>> + LoadedVT == MVT::v2i32 || LoadedVT == MVT::v1i64 ||
>> + LoadedVT == MVT::v2f32)
>> intVT = MVT::i64;
>> else if (LoadedVT == MVT::f32)
>> intVT = MVT::i32;
>> else
>> - assert(0 && "Unaligned load of unsupported floating point
>> type");
>> + assert(0 && "Unaligned load of unsupported type");
>
> Likewise.
>
> Ciao,
>
> Duncan.
More information about the llvm-commits
mailing list