[llvm-commits] [llvm] r47696 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Duncan Sands
baldrick at free.fr
Wed Feb 27 23:06:08 PST 2008
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));
?
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