Changes in directory llvm/lib/VMCore:
Type.cpp updated: 1.148 -> 1.149 --- Log message: Add isFPOrFPVector() method, which indicates if a type is either FP or a vector of FP types. --- Diffs of the changes: (+10 -0) Type.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.148 llvm/lib/VMCore/Type.cpp:1.149 --- llvm/lib/VMCore/Type.cpp:1.148 Fri Oct 20 02:07:24 2006 +++ llvm/lib/VMCore/Type.cpp Thu Oct 26 13:22:45 2006 @@ -90,6 +90,16 @@ } } +/// isFPOrFPVector - Return true if this is a FP type or a vector of FP types. +/// +bool Type::isFPOrFPVector() const { + if (ID == Type::FloatTyID || ID == Type::DoubleTyID) return true; + if (ID != Type::PackedTyID) return false; + + return cast<PackedType>(this)->getElementType()->isFloatingPoint(); +} + + // isLosslesslyConvertibleTo - Return true if this type can be converted to // 'Ty' without any reinterpretation of bits. For example, uint to int. // _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits