[llvm-commits] [llvm] r47696 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Thu Feb 28 10:59:10 PST 2008
On Feb 28, 2008, at 10:33 AM, Dale Johannesen wrote:
>
> 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 can probably do something like:
if ((isVector(VT) && MVT::getSizeInBits(VT) ==
MVT::getSizeInBits(MVT::i128)) || VT == MVT::ppcf128)
intVT = MVT::i128
It's probably a good idea to add MVT::is128BitVector() so we don't
have to type list all of these types over and over again.
Evan
>
>
>> 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.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list